mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
devices: only close PVs on LVs when scan_lvs is enabled
This code is only needed when lvm scans PVs that are stacked on LVs.
This commit is contained in:
parent
7b1a857d5a
commit
cc73d99886
@ -1661,9 +1661,11 @@ void label_scan_invalidate_lvs(struct cmd_context *cmd, struct dm_list *lvs)
|
|||||||
dev_t devt;
|
dev_t devt;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME: this is all unnecessary unless there are PVs stacked on LVs,
|
* This is only needed when the command sees PVs stacked on LVs which
|
||||||
* so we can skip all of this if scan_lvs=0.
|
* will only happen with scan_lvs=1.
|
||||||
*/
|
*/
|
||||||
|
if (!cmd->scan_lvs)
|
||||||
|
return;
|
||||||
log_debug("invalidating devs for any pvs on lvs");
|
log_debug("invalidating devs for any pvs on lvs");
|
||||||
|
|
||||||
if (get_device_list(NULL, &devs, &devs_features)) {
|
if (get_device_list(NULL, &devs, &devs_features)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user