From mboxrd@z Thu Jan 1 00:00:00 1970 From: wysochanski@sourceware.org Date: 2 Sep 2009 21:27:40 -0000 Subject: LVM2/tools vgsplit.c Message-ID: <20090902212740.12877.qmail@sourceware.org> List-Id: To: lvm-devel@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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)