Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/lv_manip.c

PATCH [email protected] 1 participant 1 message Oct 30, 2006

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2006-10-30 16:10:56

Modified files:
. : WHATS_NEW
lib/metadata : lv_manip.c

Log message:
Fix high-level free space check for partial allocations.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.486&r2=1.487
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.111&r2=1.112

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.14 - 
 ===================================
+  Fix high-level free space check for partial allocations.
 
 Version 2.02.13 - 27th October 2006
 ===================================
lib/metadata/lv_manip.c +3 -3
@@ -894,10 +894,10 @@
 
 	/* Is there enough total space? */
 	free_pes = pv_maps_size(pvms);
-	if (needed > free_pes) {
+	if (needed - *allocated > free_pes) {
 		log_error("Insufficient free space: %" PRIu32 " extents needed,"
-			  " but only %" PRIu32 " available", needed,
-			  free_pes);
+			  " but only %" PRIu32 " available",
+			  needed - *allocated, free_pes);
 		return 0;
 	}