1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lv_manip: fix out of order backup

We had only 2 remaining places that were leaving unbackuped metadata.
This commit is contained in:
Zdenek Kabelac 2014-10-03 18:39:54 +02:00
parent a0cfc5eee2
commit 0662391ff6

View File

@ -7031,6 +7031,8 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
stack;
goto revert_new_lv;
}
backup(vg);
}
if (is_change_activating(lp->activate)) {
/* Send message so that table preload knows new thin */
@ -7038,6 +7040,9 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
stack;
goto revert_new_lv;
}
backup(vg);
if (!lv_active_change(cmd, lv, lp->activate)) {
log_error("Failed to activate thin %s.", lv->name);
goto deactivate_and_revert_new_lv;
@ -7125,8 +7130,6 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
if (!lv_update_and_reload(org))
return_0;
}
/* FIXME out of sequence */
backup(vg);
out:
return lv;