mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: check for active lv
Before calling deactivate, check the lv is actually active, as we may reach this 'bad' error path with pool_lv inactive.
This commit is contained in:
parent
ef6508e9a4
commit
75a5de1462
@ -1,5 +1,6 @@
|
||||
Version 2.02.112 -
|
||||
=====================================
|
||||
Avoid leaving linear logical volume when thin pool creation fails.
|
||||
Demote an error to a warning when devices known to lvmetad are filtered out.
|
||||
Re-order filter evaluation, making component filters global.
|
||||
Don't leak alloc_handle on raid target error path.
|
||||
|
@ -450,7 +450,8 @@ int create_pool(struct logical_volume *pool_lv,
|
||||
|
||||
bad:
|
||||
if (activation()) {
|
||||
if (deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
|
||||
if (lv_is_active_locally(pool_lv) &&
|
||||
deactivate_lv_local(pool_lv->vg->cmd, pool_lv)) {
|
||||
log_error("Aborting. Could not deactivate pool %s.",
|
||||
pool_lv->name);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user