From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12897 invoked by alias); 2 Sep 2009 21:27:40 -0000 Received: (qmail 12879 invoked by uid 9657); 2 Sep 2009 21:27:40 -0000 Date: Wed, 02 Sep 2009 21:27:00 -0000 Message-ID: <20090902212740.12877.qmail@sourceware.org> From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/tools vgsplit.c Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00017.txt.bz2 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 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)