1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

When adding snapshot leave cow LV mapped device active after zeroing.

This commit is contained in:
Alasdair Kergon 2006-10-26 18:22:10 +00:00
parent 99d00efa02
commit 013577fb6a
2 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.13 -
===================================
When adding snapshot leave cow LV mapped device active after zeroing.
Fix a clvmd debug message.
Add dev_flush() to set_lv().
Add lvchange --resync.

View File

@ -761,12 +761,13 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
return 0;
}
if (!activate_lv(cmd, lv)) {
if (lp->snapshot)
/* FIXME Remove the failed lv we just added */
if (lp->snapshot) {
if (!activate_lv_excl(cmd, lv)) {
log_error("Aborting. Failed to activate snapshot "
"exception store. Remove new LV and retry.");
else
return 0;
}
} else if (!activate_lv(cmd, lv)) {
log_error("Failed to activate new LV.");
return 0;
}
@ -787,10 +788,8 @@ static int _lvcreate(struct cmd_context *cmd, struct lvcreate_params *lp)
/* Reset permission after zeroing */
if (!(lp->permission & LVM_WRITE))
lv->status &= ~LVM_WRITE;
if (!deactivate_lv(cmd, lv)) {
log_err("Couldn't deactivate new snapshot.");
return 0;
}
/* cow LV remains active and becomes snapshot LV */
if (!vg_add_snapshot(vg->fid, NULL, org, lv, NULL,
org->le_count, lp->chunk_size)) {