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:
parent
92e1422707
commit
37bd35bc3d
@ -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.");
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user