diff options
author | Petr Rockai <prockai@redhat.com> | 2014-09-09 17:14:35 +0200 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2014-09-10 22:57:49 +0100 |
commit | 1f0c4c811da287e7fc28b8c31dcd03347b16d360 (patch) | |
tree | 740b7de35fb77f818104917692d7c2c1c1e4ece8 | |
parent | 47ff145e08f689306762840efd72e8a4e1c91214 (diff) | |
download | lvm2-1f0c4c811da287e7fc28b8c31dcd03347b16d360.tar.gz |
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.
-rw-r--r-- | lib/device/dev-cache.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 1d7a517e2..ba4ee5462 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -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 |