diff options
author | David Teigland <teigland@redhat.com> | 2013-08-28 14:05:40 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-06-19 13:44:19 -0500 |
commit | 29a36e1ae9e21cd9e77e1e34112bbfe380fe2ef4 (patch) | |
tree | bcb4437241beefe684f235a155622fcc3cf1bc54 | |
parent | 59ed4d3bf6b1aaf7c3db837251c60ff9004f0879 (diff) | |
download | lvm2-29a36e1ae9e21cd9e77e1e34112bbfe380fe2ef4.tar.gz |
toollib: add ALL_VGS_IS_DEFAULT flag
The ALL_VGS_IS_DEFAULT flag is added to the command structure
for commands that should process all vgs when they call
process_each_vg or process_each_lv with no args.
This will be used in later patches to process_each functions.
-rw-r--r-- | tools/commands.h | 34 | ||||
-rw-r--r-- | tools/tools.h | 1 |
2 files changed, 21 insertions, 14 deletions
diff --git a/tools/commands.h b/tools/commands.h index 1484aefeb..06d7d2fd0 100644 --- a/tools/commands.h +++ b/tools/commands.h @@ -342,7 +342,7 @@ xx(lvcreate, xx(lvdisplay, "Display information about a logical volume", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvdisplay\n" "\t[-a|--all]\n" "\t[-c|--colon]\n" @@ -558,7 +558,7 @@ xx(lvresize, xx(lvs, "Display information about logical volumes", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvs" "\n" "\t[-a|--all]\n" "\t[--aligned]\n" @@ -594,7 +594,7 @@ xx(lvs, xx(lvscan, "List all logical volumes in all volume groups", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "lvscan " "\n" "\t[-a|--all]\n" "\t[-b|--blockdevice] " "\n" @@ -759,9 +759,15 @@ xx(pvdisplay, options_ARG, readonly_ARG, select_ARG, separator_ARG, short_ARG, sort_ARG, unbuffered_ARG, units_ARG) +/* + * When pvmove is called with no PV arguments, the polldaemon uses + * process_each_vg to search all VGs for pvmoves still in progress. + * This search of all vgs requires ALL_VGS_IS_DEFAULT. + */ + xx(pvmove, "Move extents from one physical volume to another", - 0, + ALL_VGS_IS_DEFAULT, "pvmove " "\n" "\t[--abort]\n" "\t[--alloc AllocationPolicy]\n" @@ -802,7 +808,7 @@ xx(pvremove, xx(pvs, "Display information about physical volumes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY, + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "pvs" "\n" "\t[-a|--all]\n" "\t[--aligned]\n" @@ -869,7 +875,7 @@ xx(tags, xx(vgcfgbackup, "Backup volume group configuration(s)", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgcfgbackup " "\n" "\t[--commandprofile ProfileName]\n" "\t[-d|--debug] " "\n" @@ -904,7 +910,7 @@ xx(vgcfgrestore, xx(vgchange, "Change volume group attributes", - CACHE_VGMETADATA | PERMITTED_READ_ONLY, + CACHE_VGMETADATA | PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgchange" "\n" "\t[-A|--autobackup {y|n}] " "\n" "\t[--alloc AllocationPolicy] " "\n" @@ -948,7 +954,7 @@ xx(vgchange, xx(vgck, "Check the consistency of volume group(s)", - 0, + ALL_VGS_IS_DEFAULT, "vgck " "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n" @@ -1010,7 +1016,7 @@ xx(vgcreate, xx(vgdisplay, "Display volume group information", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgdisplay " "\n" "\t[-A|--activevolumegroups]" "\n" "\t[-c|--colon | -s|--short | -v|--verbose]" "\n" @@ -1054,7 +1060,7 @@ xx(vgdisplay, xx(vgexport, "Unregister volume group(s) from the system", - 0, + ALL_VGS_IS_DEFAULT, "vgexport " "\n" "\t[-a|--all] " "\n" "\t[--commandprofile ProfileName]\n" @@ -1091,7 +1097,7 @@ xx(vgextend, xx(vgimport, "Register exported volume group with system", - 0, + ALL_VGS_IS_DEFAULT, "vgimport " "\n" "\t[-a|--all]\n" "\t[--commandprofile ProfileName]\n" @@ -1123,7 +1129,7 @@ xx(vgmerge, xx(vgmknodes, "Create the special files for volume group devices in /dev", - 0, + ALL_VGS_IS_DEFAULT, "vgmknodes\n" "\t[--commandprofile ProfileName]\n" "\t[-d|--debug]\n" @@ -1191,7 +1197,7 @@ xx(vgrename, xx(vgs, "Display information about volume groups", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgs" "\n" "\t[--aligned]\n" "\t[-a|--all]\n" @@ -1225,7 +1231,7 @@ xx(vgs, xx(vgscan, "Search for all volume groups", - PERMITTED_READ_ONLY, + PERMITTED_READ_ONLY | ALL_VGS_IS_DEFAULT, "vgscan " "\t[--cache]\n" "\t[--commandprofile ProfileName]\n" diff --git a/tools/tools.h b/tools/tools.h index 2b09f3785..cf08e0e22 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -102,6 +102,7 @@ struct arg_value_group_list { #define CACHE_VGMETADATA 0x00000001 #define PERMITTED_READ_ONLY 0x00000002 +#define ALL_VGS_IS_DEFAULT 0x00000004 /* run cmd on all vgs if none are named */ /* a register of the lvm commands */ struct command { |