mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_02_116-fix-lvm2app-to-properly-handle-info-status-properties.patch

494d99
 WHATS_NEW               | 2 ++
494d99
 lib/metadata/lv.c       | 2 +-
494d99
 lib/report/properties.c | 4 ++--
494d99
 3 files changed, 5 insertions(+), 3 deletions(-)
494d99
494d99
diff --git a/WHATS_NEW b/WHATS_NEW
494d99
index ef5cc83..7c77c68 100644
494d99
--- a/WHATS_NEW
494d99
+++ b/WHATS_NEW
494d99
@@ -1,5 +1,7 @@
494d99
 Version 2.02.116 - 
494d99
 ====================================
494d99
+  Fix lvm2app lvm_lv_get_property return value for fields with info/status ioctl.
494d99
+  Fix lvm2app regression in lvm_lv_get_attr causing unknown values (2.02.115).
494d99
   Preserve chunk size with repair and metadata swap of a thin pool.
494d99
   Fix raid --splitmirror 1 functionality (2.02.112).
494d99
   Fix tree preload to handle splitting raid images.
494d99
diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c
494d99
index 9052e63..c3c5d4a 100644
494d99
--- a/lib/metadata/lv.c
494d99
+++ b/lib/metadata/lv.c
494d99
@@ -831,7 +831,7 @@ char *lv_attr_dup(struct dm_pool *mem, const struct logical_volume *lv)
494d99
 	if (!(status.seg_status.mem = dm_pool_create("reporter_pool", 1024)))
494d99
 		return_0;
494d99
 
494d99
-	if (!lv_info_with_seg_status(lv->vg->cmd, lv, first_seg(lv), 1, &status, 1, 1))
494d99
+	if (!(status.info_ok = lv_info_with_seg_status(lv->vg->cmd, lv, first_seg(lv), 1, &status, 1, 1)))
494d99
 		goto_bad;
494d99
 
494d99
 	ret = lv_attr_dup_with_info_and_seg_status(mem, &status);
494d99
diff --git a/lib/report/properties.c b/lib/report/properties.c
494d99
index 8866928..c1c9563 100644
494d99
--- a/lib/report/properties.c
494d99
+++ b/lib/report/properties.c
494d99
@@ -476,7 +476,7 @@ int lvseg_get_property(const struct lv_segment *lvseg,
494d99
 int lv_get_property(const struct logical_volume *lv,
494d99
 		    struct lvm_property_type *prop)
494d99
 {
494d99
-	return prop_get_property(_properties, lv, prop, LVS);
494d99
+	return prop_get_property(_properties, lv, prop, LVS | LVSINFO | LVSSTATUS | LVSINFOSTATUS);
494d99
 }
494d99
 
494d99
 int vg_get_property(const struct volume_group *vg,
494d99
@@ -500,7 +500,7 @@ int pv_get_property(const struct physical_volume *pv,
494d99
 int lv_set_property(struct logical_volume *lv,
494d99
 		    struct lvm_property_type *prop)
494d99
 {
494d99
-	return prop_set_property(_properties, lv, prop, LVS);
494d99
+	return prop_set_property(_properties, lv, prop, LVS | LVSINFO | LVSSTATUS | LVSINFOSTATUS);
494d99
 }
494d99
 
494d99
 int vg_set_property(struct volume_group *vg,