summaryrefslogtreecommitdiff
path: root/tools/pvscan.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-11-05 12:19:35 -0500
committerDavid Teigland <teigland@redhat.com>2021-11-05 12:19:35 -0500
commit62533ae3fad9fece6f27e3fae7b56e40c66438fa (patch)
treef5c6fd8912c055e2e45fd8cc16a91d33e08fd564 /tools/pvscan.c
parent5f7cb977438891a073227d75029f61970b1710bd (diff)
downloadlvm2-62533ae3fad9fece6f27e3fae7b56e40c66438fa.tar.gz
vgchange -aay: optimize device list using pvs_online files
Port another optimization from pvscan -aay to vgchange -aay: "pvscan: only add device args to dev cache" This optimization avoids doing a full dev_cache_scan, and instead populates dev-cache with only the devices in the VG being activated. This involves shifting the use of pvs_online files from the hints interface up to the higher level label_scan interface. This specialized label_scan is structured around creating a list of devices from the pvs_online files. Previously, a list of all devices was created first, and then reduced based on the pvs_online files. The initial step of listing all devices was slow when thousands of devices are present on the system. This optimization extends the previous optimization that used pvs_online files to limit the devices that were actually scanned (i.e. reading to identify the device): "vgchange -aay: optimize device scan using pvs_online files"
Diffstat (limited to 'tools/pvscan.c')
-rw-r--r--tools/pvscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pvscan.c b/tools/pvscan.c
index c1f7fbe6d..6fd86e486 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -1378,7 +1378,7 @@ static int _pvscan_cache_args(struct cmd_context *cmd, int argc, char **argv,
* Does not do dev_cache_scan (adds nothing to dev-cache), and
* does not do any device id matching.
*/
- if (!setup_devices_for_pvscan_cache(cmd)) {
+ if (!setup_devices_for_online_autoactivation(cmd)) {
log_error_pvscan(cmd, "Failed to set up devices.");
return 0;
}