mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: remove stack external origins
Ensure external origin is deactivated during removal. Only unused external origins can be deactivated.
This commit is contained in:
parent
3bd9f936da
commit
a0776fe409
@ -7932,9 +7932,18 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(lv) &&
|
||||
!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "external origin"))
|
||||
return_0;
|
||||
if (lv_is_external_origin(lv)) {
|
||||
if (!_lv_remove_check_in_use(lv, force))
|
||||
return_0;
|
||||
|
||||
if (!deactivate_lv(cmd, lv))
|
||||
goto no_remove;
|
||||
|
||||
log_verbose("Removing external origin logical volume %s.", display_lvname(lv));
|
||||
|
||||
if (!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "external origin"))
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (lv_is_used_thin_pool(lv) &&
|
||||
!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "pool"))
|
||||
|
Loading…
Reference in New Issue
Block a user