[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2/tools vgsplit.c



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	wysochanski sourceware org	2009-09-02 21:27:39

Modified files:
	tools          : vgsplit.c 

Log message:
	Change vgsplit behavior to open/lock first vg based on alphabetical ordering.
	
	If the destination vgname comes before the source vgname, we must open the
	destination first because of the locking rules.  Thus, do a strcmp and set
	the flag based on the comparison.
	
	Author: Dave Wysochanski <dwysocha redhat com>

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgsplit.c.diff?cvsroot=lvm2&r1=1.92&r2=1.93

--- LVM2/tools/vgsplit.c	2009/09/02 21:27:22	1.92
+++ LVM2/tools/vgsplit.c	2009/09/02 21:27:39	1.93
@@ -314,6 +314,9 @@
 		return ECMD_FAILED;
 	}
 
+	if (strcmp(vg_name_to, vg_name_from) < 0)
+		lock_vg_from_first = 0;
+
 	if (lock_vg_from_first) {
 		vg_from = _vgsplit_from(cmd, vg_name_from);
 		if (!vg_from)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]