summaryrefslogtreecommitdiffstats
path: root/tools/vgcreate.c
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2009-07-10 20:09:21 +0000
committerDave Wysochanski <dwysocha@redhat.com>2009-07-10 20:09:21 +0000
commit7fa91ec044b977785598ef57d8c53af59b2e3782 (patch)
treea09f9292c8029502f2c18ee57462b9fdc66a76a7 /tools/vgcreate.c
parent03660b30454ec07c09c164f7fd23af278677324a (diff)
downloadlvm2-7fa91ec044b977785598ef57d8c53af59b2e3782.tar.gz
lvm2-7fa91ec044b977785598ef57d8c53af59b2e3782.tar.xz
lvm2-7fa91ec044b977785598ef57d8c53af59b2e3782.zip
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>
Diffstat (limited to 'tools/vgcreate.c')
-rw-r--r--tools/vgcreate.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/tools/vgcreate.c b/tools/vgcreate.c
index 7cfd0f29..c41c50f6 100644
--- a/tools/vgcreate.c
+++ b/tools/vgcreate.c
@@ -46,12 +46,6 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
if (validate_vg_create_params(cmd, &vp_new))
return EINVALID_CMD_LINE;
- /* FIXME: orphan lock needs tied to vg handle or inside library call */
- if (!lock_vol(cmd, VG_ORPHANS, LCK_VG_WRITE)) {
- log_error("Can't get lock for orphan PVs");
- return ECMD_FAILED;
- }
-
/* Create the new VG */
vg = vg_create(cmd, vp_new.vg_name);
if (vg_read_error(vg))
@@ -113,7 +107,6 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
}
unlock_vg(cmd, vp_new.vg_name);
- unlock_vg(cmd, VG_ORPHANS);
backup(vg);
@@ -126,6 +119,5 @@ int vgcreate(struct cmd_context *cmd, int argc, char **argv)
bad:
vg_release(vg);
unlock_vg(cmd, vp_new.vg_name);
- unlock_vg(cmd, VG_ORPHANS);
return ECMD_FAILED;
}