summaryrefslogtreecommitdiff
path: root/lib/report
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2018-06-01 13:04:12 +0100
committerJoe Thornber <ejt@redhat.com>2018-06-01 13:04:12 +0100
commitdbba1e9b93bac348c0df556b160676234cc8a8c4 (patch)
treeb1db4389e0288231ad36d7a6de607bcc38f38c3a /lib/report
parent89fdc0b5889d24fe785e7fa4c2be13659d1ed0b2 (diff)
parentcb379c86c4b468858b781695934d5ad5957108d2 (diff)
downloadlvm2-dbba1e9b93bac348c0df556b160676234cc8a8c4.tar.gz
Merge branch 'master' into 2018-05-11-fork-libdm
Diffstat (limited to 'lib/report')
-rw-r--r--lib/report/columns.h1
-rw-r--r--lib/report/properties.c2
-rw-r--r--lib/report/report.c8
-rw-r--r--lib/report/values.h1
4 files changed, 12 insertions, 0 deletions
diff --git a/lib/report/columns.h b/lib/report/columns.h
index be39ed992..827a15720 100644
--- a/lib/report/columns.h
+++ b/lib/report/columns.h
@@ -211,6 +211,7 @@ FIELD(VGS, vg, BIN, "Exported", cmd, 10, vgexported, vg_exported, "Set if VG is
FIELD(VGS, vg, BIN, "Partial", cmd, 10, vgpartial, vg_partial, "Set if VG is partial.", 0)
FIELD(VGS, vg, STR, "AllocPol", cmd, 10, vgallocationpolicy, vg_allocation_policy, "VG allocation policy.", 0)
FIELD(VGS, vg, BIN, "Clustered", cmd, 10, vgclustered, vg_clustered, "Set if VG is clustered.", 0)
+FIELD(VGS, vg, BIN, "Shared", cmd, 7, vgshared, vg_shared, "Set if VG is shared.", 0)
FIELD(VGS, vg, SIZ, "VSize", cmd, 0, vgsize, vg_size, "Total size of VG in current units.", 0)
FIELD(VGS, vg, SIZ, "VFree", cmd, 0, vgfree, vg_free, "Total amount of free space in current units.", 0)
FIELD(VGS, vg, STR, "SYS ID", cmd, 0, vgsystemid, vg_sysid, "System ID of the VG indicating which host owns it.", 0)
diff --git a/lib/report/properties.c b/lib/report/properties.c
index d944750fd..74f13c84c 100644
--- a/lib/report/properties.c
+++ b/lib/report/properties.c
@@ -213,6 +213,8 @@ GET_PV_NUM_PROPERTY_FN(pv_ba_size, SECTOR_SIZE * pv->ba_size)
#define _vg_allocation_policy_get prop_not_implemented_get
#define _vg_clustered_set prop_not_implemented_set
#define _vg_clustered_get prop_not_implemented_get
+#define _vg_shared_set prop_not_implemented_set
+#define _vg_shared_get prop_not_implemented_get
#define _lv_layout_set prop_not_implemented_set
#define _lv_layout_get prop_not_implemented_get
diff --git a/lib/report/report.c b/lib/report/report.c
index ad54ea799..4a957a713 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -3385,6 +3385,14 @@ static int _vgclustered_disp(struct dm_report *rh, struct dm_pool *mem,
return _binary_disp(rh, mem, field, clustered, GET_FIRST_RESERVED_NAME(vg_clustered_y), private);
}
+static int _vgshared_disp(struct dm_report *rh, struct dm_pool *mem,
+ struct dm_report_field *field,
+ const void *data, void *private)
+{
+ int shared = (vg_is_shared((const struct volume_group *) data)) != 0;
+ return _binary_disp(rh, mem, field, shared, GET_FIRST_RESERVED_NAME(vg_shared_y), private);
+}
+
static int _lvlayout_disp(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field,
const void *data, void *private)
diff --git a/lib/report/values.h b/lib/report/values.h
index 7c53651d4..96729efdf 100644
--- a/lib/report/values.h
+++ b/lib/report/values.h
@@ -60,6 +60,7 @@ FIELD_RESERVED_BINARY_VALUE(vg_extendable, vg_extendable, "", "extendable")
FIELD_RESERVED_BINARY_VALUE(vg_exported, vg_exported, "", "exported")
FIELD_RESERVED_BINARY_VALUE(vg_partial, vg_partial, "", "partial")
FIELD_RESERVED_BINARY_VALUE(vg_clustered, vg_clustered, "", "clustered")
+FIELD_RESERVED_BINARY_VALUE(vg_shared, vg_shared, "", "shared")
FIELD_RESERVED_VALUE(NAMED, vg_permissions, vg_permissions_rw, "", "writeable", "writeable", "rw", "read-write")
FIELD_RESERVED_VALUE(NAMED, vg_permissions, vg_permissions_r, "", "read-only", "read-only", "r", "ro")
FIELD_RESERVED_VALUE(NOFLAG, vg_mda_copies, vg_mda_copies_unmanaged, "", &GET_TYPE_RESERVED_VALUE(num_undef_64), "unmanaged")