1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

reorder commit

This commit is contained in:
Alasdair Kergon 2005-10-28 14:38:20 +00:00
parent 1817dbaf60
commit fea5c22b7c

View File

@ -748,12 +748,6 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
return 0; return 0;
} }
/* FIXME write/commit/backup sequence issue */
if (!suspend_lv(cmd, org)) {
log_error("Failed to suspend origin %s", org->name);
return 0;
}
if (!vg_add_snapshot(vg->fid, NULL, org, lv, NULL, if (!vg_add_snapshot(vg->fid, NULL, org, lv, NULL,
org->le_count, lp->chunk_size)) { org->le_count, lp->chunk_size)) {
log_err("Couldn't create snapshot."); log_err("Couldn't create snapshot.");
@ -761,7 +755,15 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
} }
/* store vg on disk(s) */ /* store vg on disk(s) */
if (!vg_write(vg) || !vg_commit(vg)) if (!vg_write(vg))
return 0;
if (!suspend_lv(cmd, org)) {
log_error("Failed to suspend origin %s", org->name);
return 0;
}
if (!vg_commit(vg))
return 0; return 0;
if (!resume_lv(cmd, org)) { if (!resume_lv(cmd, org)) {