diff options
Diffstat (limited to 'tools/toollib.c')
-rw-r--r-- | tools/toollib.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/toollib.c b/tools/toollib.c index d74e0932d..fd8571c9c 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; @@ -2303,17 +2304,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); } } } |