summaryrefslogtreecommitdiff
path: root/tools/command.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2018-04-18 16:29:42 -0500
committerDavid Teigland <teigland@redhat.com>2018-04-20 11:23:14 -0500
commitaee27dc7bad5734012885fe9f174def0a3f26771 (patch)
treea80a9f5db1b4f999cb620b4f22155b0d79d67bd5 /tools/command.c
parent7b0a8f47be7df13aab0552599aa2dc2233cc223c (diff)
downloadlvm2-aee27dc7bad5734012885fe9f174def0a3f26771.tar.gz
scan: skip device rescan in vg_read
For reporting commands (pvs,vgs,lvs,pvdisplay,vgdisplay,lvdisplay) we do not need to repeat the label scan of devices in vg_read if they all had matching metadata in the initial label scan. The data read by label scan can just be reused for the vg_read. This cuts the amount of device i/o in half, from two reads of each device to one. We have to be careful to avoid repairing the VG if we've skipped rescanning. (The VG repair code is very poor, and will be redone soon.)
Diffstat (limited to 'tools/command.c')
-rw-r--r--tools/command.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/command.c b/tools/command.c
index f3b5d82e3..377d03f0f 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -140,6 +140,7 @@ static inline int configtype_arg(struct cmd_context *cmd __attribute__((unused))
#define ENABLE_DUPLICATE_DEVS 0x00000400
#define DISALLOW_TAG_ARGS 0x00000800
#define GET_VGNAME_FROM_OPTIONS 0x00001000
+#define CAN_USE_ONE_SCAN 0x00002000
/* create foo_CMD enums for command def ID's in command-lines.in */