Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/lv_manip.c

PATCH [email protected] 1 participant 1 message Nov 15, 2011

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-11-15 17:27:42

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

Log message:
Reorder AND test condition

Take the easiest condition for checking first since they must apply all together, check local conditions first before doing more expensive tests.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2184&r2=1.2185
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.334&r2=1.335

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.89 - 
 ==================================
+  Reorder prompt conditions for removal of active volumes.
   Avoid 'mda inconsistency' by properly registering UNLABELLED_PV flag (2.02.86).
   Fix --enable-static_link unless using --enable-dmeventd / --enable-udev_sync.
   Move gentoo MAKEDEV to /sbin in lvm2create_initrd.
lib/metadata/lv_manip.c +2 -1
@@ -3179,8 +3179,9 @@
 		if (!lv_check_not_in_use(cmd, lv, &info))
 			return_0;
 
-		if (lv_is_active(lv) && (force == PROMPT) &&
+		if ((force == PROMPT) &&
 		    lv_is_visible(lv) &&
+		    lv_is_active(lv) &&
 		    yes_no_prompt("Do you really want to remove active "
 				  "%slogical volume %s? [y/n]: ",
 				  vg_is_clustered(vg) ? "clustered " : "",