Skip to contentSkip to conversation

master - vg_validate: new RAID segment checks in check_lv_segments() introduced with commit 8f62b7bfe56c rely on complete defintions of the relations between the LVs of a VG. Hence only run these checks when the complete_vg flag is set on calls to check_lv_segments().

PATCH Heinz Mauelshagen 1 participant 1 message Aug 1, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=5765a2845600b827eab782e02250060eb4520c81
Commit:        5765a2845600b827eab782e02250060eb4520c81
Parent:        c490be9134a3c571636ab67d99ffeeac27d9b56f
Author:        Heinz Mauelshagen <[email protected]>
AuthorDate:    Mon Aug 1 22:42:05 2016 +0200
Committer:     Heinz Mauelshagen <[email protected]>
CommitterDate: Mon Aug 1 22:42:05 2016 +0200

vg_validate: new RAID segment checks in check_lv_segments() introduced with commit 8f62b7bfe56c rely on complete defintions of the relations between the LVs of a VG. Hence only run these checks when the complete_vg flag is set on calls to check_lv_segments().

lvconvert failed in test lvconvert-thin-raid.sh when calling check_lv_segments() from _read_segments() without providing a complete definition.

---
 lib/metadata/merge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
lib/metadata/merge.c +1 -1
index 12c3829..be491e3 100644
@@ -391,7 +391,7 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
 	dm_list_iterate_items(seg, &lv->segments) {
 		seg_count++;
 
-		if (seg_is_raid(seg))
+		if (complete_vg && seg_is_raid(seg))
 			 _check_raid_seg(seg, &error_count);
 		
 		if (seg->le != le) {