summaryrefslogtreecommitdiff
path: root/tools/vgextend.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2009-09-14 22:47:49 +0000
committerAlasdair Kergon <agk@redhat.com>2009-09-14 22:47:49 +0000
commit651ff9b32865373f9f6298fbe7b0ea5419da3746 (patch)
tree898c9215fdb07ca76b616f29cbcd45d3cbd74d21 /tools/vgextend.c
parent905240f91da66571da073df8784f1f42b2888328 (diff)
downloadlvm2-651ff9b32865373f9f6298fbe7b0ea5419da3746.tar.gz
Add lots of missing stack debug messages to tools.
Make readonly locking available as locking type 4. Fix readonly locking to permit writeable global locks (for vgscan). (2.02.49)
Diffstat (limited to 'tools/vgextend.c')
-rw-r--r--tools/vgextend.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/vgextend.c b/tools/vgextend.c
index 20c05c3d7..b659492eb 100644
--- a/tools/vgextend.c
+++ b/tools/vgextend.c
@@ -40,6 +40,7 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
vg = vg_read_for_update(cmd, vg_name, NULL, 0);
if (vg_read_error(vg)) {
vg_release(vg);
+ stack;
return ECMD_FAILED;
}
@@ -50,11 +51,11 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
}
if (!archive(vg))
- goto error;
+ goto_bad;
/* extend vg */
if (!vg_extend(vg, argc, argv))
- goto error;
+ goto_bad;
/* ret > 0 */
log_verbose("Volume group \"%s\" will be extended by %d new "
@@ -62,13 +63,13 @@ int vgextend(struct cmd_context *cmd, int argc, char **argv)
/* store vg on disk(s) */
if (!vg_write(vg) || !vg_commit(vg))
- goto error;
+ goto_bad;
backup(vg);
log_print("Volume group \"%s\" successfully extended", vg_name);
r = ECMD_PROCESSED;
-error:
+bad:
unlock_vg(cmd, VG_ORPHANS);
unlock_and_release_vg(cmd, vg, vg_name);
return r;