[lvm-devel] LVM2/tools vgsplit.c
wysochanski at sourceware.org
wysochanski at sourceware.org
Wed Sep 2 21:27:40 UTC 2009
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: wysochanski at 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 at 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)
More information about the lvm-devel
mailing list