master - report: add full_ancestors field to display ancestors with history
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=715f1fb4c4cbdb49a86ee95e17070d0ecc548ee0 Commit: 715f1fb4c4cbdb49a86ee95e17070d0ecc548ee0 Parent: f228750386ae4b5b00375e1a14139b53f86f9cca Author: Peter Rajnoha <[email protected]> AuthorDate: Tue Mar 1 15:24:40 2016 +0100 Committer: Peter Rajnoha <[email protected]> CommitterDate: Thu Mar 3 13:49:15 2016 +0100
report: add full_ancestors field to display ancestors with history
The lv_full_ancestors reporting field is just like the existing lv_ancestors field but it also takes into account any history and indirect relations recorded.
--- lib/report/columns.h | 3 +- lib/report/properties.c | 2 + lib/report/report.c | 85 +++++++++++++++++++++++++++++++++++++++------- 3 files changed, 76 insertions(+), 14 deletions(-)
lib/report/columns.h +2 -1
@@ -65,7 +65,8 @@ FIELD(LVS, lv, NUM, "#Seg", lvid, 4, lvsegcount, seg_count, "Number of segments FIELD(LVS, lv, STR, "Origin", lvid, 6, origin, origin, "For snapshots, the origin device of this LV.", 0) FIELD(LVS, lv, STR, "Origin UUID", lvid, 38, originuuid, origin_uuid, "For snapshots, the UUID of origin device of this LV.", 0) FIELD(LVS, lv, SIZ, "OSize", lvid, 5, originsize, origin_size, "For snapshots, the size of the origin device of this LV.", 0) -FIELD(LVS, lv, STR_LIST, "Ancestors", lvid, 12, lvancestors, lv_ancestors, "Ancestors of this LV.", 0) +FIELD(LVS, lv, STR_LIST, "Ancestors", lvid, 12, lvancestors, lv_ancestors, "LV ancestors ignoring any stored history of the ancestry chain.", 0) +FIELD(LVS, lv, STR_LIST, "FAncestors", lvid, 12, lvfullancestors, lv_full_ancestors, "LV ancestors including stored history of the ancestry chain.", 0) FIELD(LVS, lv, STR_LIST, "Descendants", lvid, 12, lvdescendants, lv_descendants, "Descendants of this LV.", 0) FIELD(LVS, lv, PCT, "Data%", lvid, 6, datapercent, data_percent, "For snapshot and thin pools and volumes, the percentage full if LV is active.", 0)FIELD (LVS , lv,PCT ,"Snap%" , lvid,6 , snpercent, snap_percent,"For snapshots, the percentage full if LV is active." ,0 )
lib/report/properties.c +2 -0
@@ -312,6 +312,8 @@ GET_LV_NUM_PROPERTY_FN(origin_size, (SECTOR_SIZE * lv_origin_size(lv)))#define _origin_size_set prop_not_implemented_set#define _lv_ancestors_set prop_not_implemented_set#define _lv_ancestors_get prop_not_implemented_get +#define _lv_full_ancestors_set prop_not_implemented_set +#define _lv_full_ancestors_get prop_not_implemented_get#define _lv_descendants_set prop_not_implemented_set#define _lv_descendants_get prop_not_implemented_getGET_LV_NUM_PROPERTY_FN (snap_percent,_snap_percent (lv))
lib/report/report.c +72 -13
118 lines not on this page · raw message