1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

pvscan: Remove duplicate filter wipe.

Also always clear the internal lvmcache after rescanning, and
reinstate a test for --trustcache so that 'pvs --trustcache'
(for example) avoids rescanning.
This commit is contained in:
Alasdair G Kergon 2015-12-14 20:14:59 +00:00
parent 92e1422707
commit 37bd35bc3d
2 changed files with 4 additions and 5 deletions

View File

@ -404,10 +404,6 @@ int pvscan(struct cmd_context *cmd, int argc, char **argv)
if (!lockd_gl(cmd, "sh", 0))
return_ECMD_FAILED;
if (cmd->full_filter->wipe)
cmd->full_filter->wipe(cmd->full_filter);
lvmcache_destroy(cmd, 1, 0);
if (!(handle = init_processing_handle(cmd))) {
log_error("Failed to initialize processing handle.");

View File

@ -3344,7 +3344,10 @@ int process_each_pv(struct cmd_context *cmd,
* it were not done here first. It's called here first
* so that get_vgnameids() will look at any new devices.
*/
dev_cache_full_scan(cmd->full_filter);
if (!trust_cache()) {
dev_cache_full_scan(cmd->full_filter);
lvmcache_destroy(cmd, 1, 0);
}
/*
* Need pvid's set on all PVs before processing so that pvid's