summaryrefslogtreecommitdiff
path: root/tools/toollib.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/toollib.c')
-rw-r--r--tools/toollib.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/toollib.c b/tools/toollib.c
index e739ecf9e..9d2b88b8c 100644
--- a/tools/toollib.c
+++ b/tools/toollib.c
@@ -2221,6 +2221,7 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
struct physical_volume *pv;
struct pv_list *pvl;
struct device_id_list *dil;
+ struct device *dev_orig;
const char *pv_name;
int process_pv;
int dev_found;
@@ -2298,17 +2299,21 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
_device_list_remove(arg_devices, dil->dev);
/*
- * This will simply display the same PV
- * multiple times. Further changes would
- * be needed to make this display the details
- * of dil->dev instead of pv->dev.
+ * Replace pv->dev with this dil->dev
+ * in lvmcache so the duplicate dev
+ * info will be reported.
*/
+ dev_orig = pv->dev;
+ lvmcache_replace_dev(cmd, pv, dil->dev);
ret = process_single_pv(cmd, vg, pv, handle);
if (ret != ECMD_PROCESSED)
stack;
if (ret > ret_max)
ret_max = ret;
+
+ /* Put the cache state back as it was. */
+ lvmcache_replace_dev(cmd, pv, dev_orig);
}
}
}