Skip to contentSkip to conversation

master - vgchange/lvchange: fix poll and monitor use

PATCH David Teigland 1 participant 1 message Apr 4, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1c41898c07ad750820fb39770355fded8e9b030a
Commit:        1c41898c07ad750820fb39770355fded8e9b030a
Parent:        a12b3af033d8086e0399e5433a3307ebb05b9d0b
Author:        David Teigland <[email protected]>
AuthorDate:    Tue Apr 4 12:52:29 2017 -0500
Committer:     David Teigland <[email protected]>
CommitterDate: Tue Apr 4 17:04:45 2017 -0500

vgchange/lvchange: fix poll and monitor use

Fill in some gaps where old versions of lvm allowed --poll and --monitor in combination with other operations, but those combinations had been lost since the cmd def work. (The new cmd def code also added some combinations that had been missed by the old code.)

Changes:

lvchange --activate: add poll and monitor options, and
add calls to them in implementation.

lvchange --refresh: add monitor option (poll already there),
and call to monitor in implementation.

lvchange <metadata ops>: add poll and monitor options, and
add calls to them in implementation.

vgchange <metadata ops>: add poll option (call to poll
already in implementation).

vgchange --refresh: remove monitor option (not used by code)

lvchange --persistent y: add poll and monitor options, and
add calls to them, and to activate in the implementation. (Making it match the main lvchange metadata command.)

Summary of current usage:

lvchange --activate: monitor, poll
vgchange --activate: monitor, poll

lvchange --refresh: monitor, poll
vgchange --refresh: poll

lvchange --monitor: ok
lvchange --poll: ok
lvchange --monitor --poll: ok
vgchange --monitor: ok
vgchange --poll: ok
vgchange --monitor --poll: ok

lvchange <metadata ops>: monitor, poll
vgchange <metadata ops>: poll

---
 tools/command-lines.in |   16 ++++++------
 tools/lvchange.c       |   62 +++++++++++++++++++++++++++++++++++++++++------
 2 files changed, 62 insertions(+), 16 deletions(-)
tools/command-lines.in +8 -8
index fe98cc6..20a9e79 100644
@@ -234,7 +234,7 @@ OO_LVCHANGE_META: --addtag Tag, --deltag Tag,
 # in combination with unrelated metadata changes.
 
 lvchange OO_LVCHANGE_META VG|LV|Tag|Select ...
-OO: --activate Active, OO_LVCHANGE
+OO: --activate Active, --poll Bool, --monitor Bool, OO_LVCHANGE
 ID: lvchange_properties
 DESC: Change a general LV attribute.
 DESC: For options listed in parentheses, any one is
@@ -275,18 +275,18 @@ DESC: Reconstruct data on specific PVs of a raid LV.
 RULE: all not LV_raid0
 
 lvchange --activate Active VG|LV|Tag|Select ...
-OO: --activationmode ActivationMode, --partial, --ignoreactivationskip,
---ignorelockingfailure, --sysinit, OO_LVCHANGE
+OO: --activationmode ActivationMode, --partial, --poll Bool, --monitor Bool,
+--ignoreactivationskip, --ignorelockingfailure, --sysinit, OO_LVCHANGE
 ID: lvchange_activate
 DESC: Activate or deactivate an LV.
 
 lvchange --refresh VG|LV|Tag|Select ...
-OO: --activationmode ActivationMode, --partial, --poll Bool, OO_LVCHANGE
+OO: --activationmode ActivationMode, --partial, --poll Bool, --monitor Bool, OO_LVCHANGE
 ID: lvchange_refresh
 DESC: Reactivate an LV using the latest metadata.
 
 lvchange --monitor Bool VG|LV|Tag|Select ...
-OO: --poll Bool, OO_LVCHANGE
+OO: OO_LVCHANGE
 ID: lvchange_monitor
 DESC: Start or stop monitoring an LV from dmeventd.
 RULE: all not lv_is_pvmove
@@ -297,7 +297,7 @@ ID: lvchange_poll
 DESC: Start or stop processing an LV conversion.
 
 lvchange --persistent y --minor Number LV
-OO: --major Number, --activate Activate, OO_LVCHANGE
+OO: --major Number, --activate Activate, --poll Bool, --monitor Bool, OO_LVCHANGE
 ID: lvchange_persistent
 DESC: Make the minor device number persistent for an LV.
 RULE: all not LV_thinpool LV_cachepool
@@ -1470,7 +1470,7 @@ OO_VGCHANGE_META: --addtag Tag, --deltag Tag,
 --profile String, --detachprofile, --metadataprofile String
 
 vgchange OO_VGCHANGE_META
-OO: OO_VGCHANGE
+OO: --poll Bool, OO_VGCHANGE
 OP: VG|Tag|Select ...
 ID: vgchange_properties
 DESC: Change a general VG attribute.
@@ -1497,7 +1497,7 @@ ID: vgchange_activate
 DESC: Activate or deactivate LVs.
 
 vgchange --refresh
-OO: --sysinit, --ignorelockingfailure, --monitor Bool, --poll Bool, OO_VGCHANGE
+OO: --sysinit, --ignorelockingfailure, --poll Bool, OO_VGCHANGE
 OP: VG|Tag|Select ...
 ID: vgchange_refresh
 DESC: Reactivate LVs using the latest metadata.
tools/lvchange.c +54 -8

116 lines not on this page · raw message