Skip to contentSkip to conversation

LVM: cleanup 2

PATCH New Jonathan Brassow 2 participants 2 messages Jan 10, 2011 – Jan 11, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 LVM: cleanup 2

Patch name: lvm-cleanup-2.patch

The check for segtype_is_virtual is done at the top of the function, no need to do it again at the bottom.

lib/metadata/lv_manip.c +1 -2
Index: LVM2/lib/metadata/lv_manip.c
===================================================================
@@ -1557,8 +1557,7 @@ struct alloc_handle *allocate_extents(st
 			       parallel_areas)))
 		return_NULL;
 
-	if (!segtype_is_virtual(segtype) &&
-	    !_allocate(ah, vg, lv, 1, allocatable_pvs)) {
+	if (!_allocate(ah, vg, lv, 1, allocatable_pvs)) {
 		alloc_destroy(ah);
 		return_NULL;
 	}
#1 lore raw

PATCH 1/1 LVM: cleanup 2

Dne 10.1.2011 21:56, Jonathan Brassow napsal(a):

Quoted 12 lines

Patch name: lvm-cleanup-2.patch

The check for segtype_is_virtual is done at the top of the function, no need to do it again at the bottom.

Index: LVM2/lib/metadata/lv_manip.c
===================================================================

lib/metadata/lv_manip.c struct alloc_handle *allocate_extents(st · line 1563

Quoted 9 lines
lib/metadata/lv_manip.c +1 -2
@@ -1557,8 +1557,7 @@ struct alloc_handle *allocate_extents(st
 			       parallel_areas)))
 		return_NULL;
 
-	if (!segtype_is_virtual(segtype) &&
-	    !_allocate(ah, vg, lv, 1, allocatable_pvs)) {
+	if (!_allocate(ah, vg, lv, 1, allocatable_pvs)) {
 		alloc_destroy(ah);
 		return_NULL;
 	}

Ack

Zdenek