diff options
author | David Teigland <teigland@redhat.com> | 2018-04-18 16:29:42 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2018-04-20 11:23:14 -0500 |
commit | aee27dc7bad5734012885fe9f174def0a3f26771 (patch) | |
tree | a80a9f5db1b4f999cb620b4f22155b0d79d67bd5 /tools/command.c | |
parent | 7b0a8f47be7df13aab0552599aa2dc2233cc223c (diff) | |
download | lvm2-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.c | 1 |
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 */ |