mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-11 20:58:50 +03:00
We must hold the VG_ORPHAN lock until we commit to disk. Otherwise, we risk a race condition on vgcreate / vgextend. Reverts the following commit: commit 72a41480ba66d7dc2d05ef8583080b6b08208507 Author: Dave Wysochanski <dwysocha@redhat.com> Date: Fri Jul 10 20:09:21 2009 +0000 Move orphan lock obtain/release inside vg_extend(). With this change we now have vgcreate/vgextend liblvm functions. Note that this changes the lock order of the following functions as the orphan lock is now obtained first. With our policy of non-blocking second locks, this should not be a problem. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>