Skip to contentSkip to conversation

LVM2/lib/metadata lv_manip.c

PATCH [email protected] 1 participant 1 message Mar 1, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-03-01 10:09:37

Modified files:
lib/metadata : lv_manip.c

Log message:
Add stack trace for lv_reduce

Use common code call with stack trace.

TODO: maybe the release_lv_segment_area()
should be actually able to return error code to upper level.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.368&r2=1.369

lib/metadata/lv_manip.c +4 -7
@@ -312,13 +312,10 @@
 		return;
 	}
 
-	if (seg_lv(seg, s)->status & MIRROR_IMAGE) {
-		lv_reduce(seg_lv(seg, s), area_reduction);
-		return;
-	}
-
-	if (seg_lv(seg, s)->status & THIN_POOL_DATA) {
-		lv_reduce(seg_lv(seg, s), area_reduction);
+	if ((seg_lv(seg, s)->status & MIRROR_IMAGE) ||
+	    (seg_lv(seg, s)->status & THIN_POOL_DATA)) {
+		if (!lv_reduce(seg_lv(seg, s), area_reduction))
+			stack; /* FIXME: any upper level reporting */
 		return;
 	}