summaryrefslogtreecommitdiff
path: root/lib/cache/lvmcache.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-04-20 14:13:50 -0500
committerDavid Teigland <teigland@redhat.com>2015-04-22 12:13:51 -0500
commitda6fca6e1a584e57b341d9bfb0824fe3a224faeb (patch)
tree82927a5c15a558a12941935effdfeebe99995b4e /lib/cache/lvmcache.c
parent92607ecfe62c2590c7816d53c709d3b96faa2357 (diff)
downloadlvm2-dev-dct-dupdev3.tar.gz
Improve duplicate PV handlingdev-dct-dupdev3
Make the processing of duplicate PVs the same with and without lvmetad.
Diffstat (limited to 'lib/cache/lvmcache.c')
-rw-r--r--lib/cache/lvmcache.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 6f8c95085..c5f78c864 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1610,10 +1610,13 @@ struct lvmcache_info *lvmcache_add(struct labeller *labeller, const char *pvid,
//dm_is_dm_major(MAJOR(dev->dev)))
//
else if (!strcmp(pvid_s, existing->dev->pvid)) {
- log_error("Found duplicate PV %s: using %s not "
- "%s", pvid, dev_name(dev),
- dev_name(existing->dev));
+ log_error("Found duplicate PV %s: using %s not %s",
+ pvid_s,
+ dev_name(existing->dev),
+ dev_name(dev));
+ strncpy(dev->pvid, pvid_s, sizeof(dev->pvid));
_found_duplicate_pvs = 1;
+ return NULL;
}
}
if (strcmp(pvid_s, existing->dev->pvid))