mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cleanup: deactivate has builtin check for active lv
This commit is contained in:
parent
74923c213f
commit
c621bc3d36
@ -1523,10 +1523,9 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,
|
||||
MIRROR_BY_LV)) {
|
||||
layer_lv = seg_lv(first_seg(lv), 0);
|
||||
if (!remove_layer_from_lv(lv, layer_lv) ||
|
||||
(lv_is_active(layer_lv) &&
|
||||
!deactivate_lv(cmd, layer_lv)) ||
|
||||
!lv_remove(layer_lv) || !vg_write(lv->vg) ||
|
||||
!vg_commit(lv->vg)) {
|
||||
!deactivate_lv(cmd, layer_lv) ||
|
||||
!lv_remove(layer_lv) ||
|
||||
!vg_write(lv->vg) || !vg_commit(lv->vg)) {
|
||||
log_error("ABORTING: Failed to remove "
|
||||
"temporary mirror layer %s.",
|
||||
display_lvname(layer_lv));
|
||||
|
Loading…
Reference in New Issue
Block a user