Skip to contentSkip to conversation

master - report: add lv_active_{locally, remotely, exclusively} LV reporting fields

PATCH Peter Rajnoha 1 participant 1 message Jul 9, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=bccc2bef33af081264bbc356e37efe89ef78b796
Commit:        bccc2bef33af081264bbc356e37efe89ef78b796
Parent:        b6ac8819f694d0b28fc592e89f01a8cf8e4f1802
Author:        Peter Rajnoha <[email protected]>
AuthorDate:    Wed Jul 9 14:28:50 2014 +0200
Committer:     Peter Rajnoha <[email protected]>
CommitterDate: Wed Jul 9 15:57:05 2014 +0200

report: add lv_active_{locally,remotely,exclusively} LV reporting fields

lv_active_{locally,remotely,exclusively} display the original "lv_active" field in a more separate way so that we can create selection criteria in a binary-based form (yes/no).

---
 WHATS_NEW               |    1 +
 lib/report/columns.h    |    3 ++
 lib/report/properties.c |    6 +++++
 lib/report/report.c     |   54 +++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 64 insertions(+), 0 deletions(-)
WHATS_NEW +1 -0
index d4649e4..21668f2 100644
@@ -1,5 +1,6 @@
 Version 2.02.108 -
 =================================
+  Add separate lv_active_{locally,remotely,exclusively} LV reporting fields.
   Recognize "auto"/"unmanaged" values in selection for appropriate fields only.
   Add report/binary_values_as_numeric lvm.conf option for binary values as 0/1.
   Add --binary arg to pvs,vgs,lvs and {pv,vg,lv}display -C for 0/1 on reports.
lib/report/columns.h +3 -0
index 5013834..3d3d76e 100644
@@ -53,6 +53,9 @@ FIELD(LVS, lv, STR, "TargetType", lvid, 10, lvtargettype, lv_target_type, "Kerne
 FIELD(LVS, lv, STR, "Health", lvid, 15, lvhealthstatus, lv_health_status, "LV health status.", 0)
 FIELD(LVS, lv, BIN, "SkipAct", lvid, 15, lvskipactivation, lv_skip_activation, "Set if LV is skipped on activation.", 0)
 FIELD(LVS, lv, STR, "Active", lvid, 6, lvactive, lv_active, "Active state of the LV.", 0)
+FIELD(LVS, lv, BIN, "ActiveLoc", lvid, 10, lvactivelocally, lv_active_locally, "Set if the LV is active locally.", 0)
+FIELD(LVS, lv, BIN, "ActiveRem", lvid, 10, lvactiveremotely, lv_active_remotely, "Set if the LV is active remotely.", 0)
+FIELD(LVS, lv, BIN, "ActiveExcl", lvid, 10, lvactiveexclusively, lv_active_exclusively, "Set if the LV is active exclusively.", 0)
 FIELD(LVS, lv, NUM, "Maj", major, 3, int32, lv_major, "Persistent major number or -1 if not persistent.", 0)
 FIELD(LVS, lv, NUM, "Min", minor, 3, int32, lv_minor, "Persistent minor number or -1 if not persistent.", 0)
 FIELD(LVS, lv, SIZ, "Rahead", lvid, 6, lvreadahead, lv_read_ahead, "Read ahead setting in current units.", 0)
lib/report/properties.c +6 -0
index 8fb1e92..b4e183f 100644
@@ -196,6 +196,12 @@ GET_PV_NUM_PROPERTY_FN(pv_ba_size, SECTOR_SIZE * pv->ba_size)
 #define _lv_allocation_policy_get prop_not_implemented_get
 #define _lv_allocation_locked_set prop_not_implemented_set
 #define _lv_allocation_locked_get prop_not_implemented_get
+#define _lv_active_locally_set prop_not_implemented_set
+#define _lv_active_locally_get prop_not_implemented_get
+#define _lv_active_remotely_set prop_not_implemented_set
+#define _lv_active_remotely_get prop_not_implemented_get
+#define _lv_active_exclusively_set prop_not_implemented_set
+#define _lv_active_exclusively_get prop_not_implemented_get
 #define _lv_fixed_minor_set prop_not_implemented_set
 #define _lv_fixed_minor_get prop_not_implemented_get
 #define _lv_merge_failed_set prop_not_implemented_set
lib/report/report.c +54 -0

72 lines not on this page · raw message