1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00

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>
This commit is contained in:
Dave Wysochanski 2009-09-02 21:27:39 +00:00
parent 763d659ee2
commit 4494c25df7

View File

@ -314,6 +314,9 @@ int vgsplit(struct cmd_context *cmd, int argc, char **argv)
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)