Skip to contentSkip to conversation

LVM2 lib/metadata/lv_manip.c test/t-lvcreate-s ...

PATCH [email protected] 1 participant 1 message Sep 16, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall at sourceware.org 2011-09-16 09:59:43

Modified files:
lib/metadata : lv_manip.c
Added files:
test : t-lvcreate-striped-mirror.sh

Log message:
Fix the divisibility check in the allocator for the mirror+stripe case (require divisibility by stripe count alone, not by (mirror*stripe)).

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.285&r2=1.286
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/test/t-lvcreate-striped-mirror.sh.diff?cvsroot=lvm2&r1=NONE&r2=1.1

lib/metadata/lv_manip.c +4 -3
@@ -1917,10 +1917,11 @@
 		return 1;
 	}
 
-	if (ah->area_multiple > 1 &&
-	    (ah->new_extents - alloc_state.allocated) % ah->area_count) {
+        if (ah->area_multiple > 1 &&
+            (ah->new_extents - alloc_state.allocated) % ah->area_multiple) {
 		log_error("Number of extents requested (%d) needs to be divisible by %d.",
-			  ah->new_extents - alloc_state.allocated, ah->area_count);
+			  ah->new_extents - alloc_state.allocated,
+			  ah->area_multiple);
 		return 0;
 	}
 

/cvs/lvm2/LVM2/test/t-lvcreate-striped-mirror.sh,v --> standard output revision 1.1

- renamed from test/t-lvcreate-striped-mirror.sh +65 -0

65 lines not on this page · raw message