summaryrefslogtreecommitdiff
path: root/tools/lvmcmdline.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-07-15 16:33:50 -0500
committerDavid Teigland <teigland@redhat.com>2021-11-04 10:58:16 -0500
commit726dd25969e9e6a3de285a22cea45e9f5f53520f (patch)
treea9e8c5301c897c6b30840c44e025d1d2cafdbbb5 /tools/lvmcmdline.c
parent6ea8d975b23758e6e099bf51cf7334f27f9fd096 (diff)
downloadlvm2-726dd25969e9e6a3de285a22cea45e9f5f53520f.tar.gz
add hints interface to the pvs_online file information
The information in /run/lvm/pvs_online/<pvid> files can be used to build a list of devices for a given VG. The pvscan -aay command has long used this information to activate a VG while scanning only devices in that VG, which is an important optimization for autoactivation. This patch implements the same thing through the existing device hints interface, so that the optimization can be applied elsewhere. A future patch will take advantage of this optimization in vgchange -aay, which is now used in place of pvscan -aay for event activation.
Diffstat (limited to 'tools/lvmcmdline.c')
-rw-r--r--tools/lvmcmdline.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
index 1e12bedca..9cbeab91d 100644
--- a/tools/lvmcmdline.c
+++ b/tools/lvmcmdline.c
@@ -2540,6 +2540,8 @@ static int _get_current_settings(struct cmd_context *cmd)
if (!strcmp(hint_mode, "none")) {
cmd->enable_hints = 0;
cmd->use_hints = 0;
+ } else if (!strcmp(hint_mode, "pvs_online")) {
+ cmd->hints_pvs_online = 1;
}
}