mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dev-cache: Filter wipe does not guarantee a full /dev scan.
The code in dev_iter_create assumes that if a filter can be wiped, doing so will always trigger a call to _full_scan. This is not true for composite filters though, since they can always be wiped in principle, but there is no way to know that a component filter inside will exist that actually triggers the scan.
This commit is contained in:
parent
47ff145e08
commit
1f0c4c811d
@ -1009,9 +1009,11 @@ struct dev_iter *dev_iter_create(struct dev_filter *f, int dev_scan)
|
||||
if (dev_scan && !trust_cache()) {
|
||||
/* Flag gets reset between each command */
|
||||
if (!full_scan_done()) {
|
||||
if (f && f->wipe)
|
||||
f->wipe(f); /* Calls _full_scan(1) */
|
||||
else
|
||||
if (f && f->wipe) {
|
||||
f->wipe(f); /* might call _full_scan(1) */
|
||||
if (!full_scan_done())
|
||||
_full_scan(1);
|
||||
} else
|
||||
_full_scan(1);
|
||||
}
|
||||
} else
|
||||
|
Loading…
Reference in New Issue
Block a user