mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
label: check only with active device for rescan
When 'lv_info()' is called with &info structure, the presence of node has to be checked from this structure. Without this we were needlesly trying to look out 0:0 device.
This commit is contained in:
parent
56620b9039
commit
00531186fc
@ -1424,12 +1424,12 @@ void label_scan_invalidate_lv(struct cmd_context *cmd, struct logical_volume *lv
|
||||
struct device *dev;
|
||||
dev_t devt;
|
||||
|
||||
if (!lv_info(cmd, lv, 0, &lvinfo, 0, 0))
|
||||
return;
|
||||
|
||||
devt = MKDEV(lvinfo.major, lvinfo.minor);
|
||||
if ((dev = dev_cache_get_by_devt(cmd, devt, NULL, NULL)))
|
||||
label_scan_invalidate(dev);
|
||||
if (lv_info(cmd, lv, 0, &lvinfo, 0, 0) && lvinfo.exists) {
|
||||
/* FIXME: Still unclear what is it supposed to find */
|
||||
devt = MKDEV(lvinfo.major, lvinfo.minor);
|
||||
if ((dev = dev_cache_get_by_devt(cmd, devt, NULL, NULL)))
|
||||
label_scan_invalidate(dev);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user