mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
cache: enforce local exlusive activation
For cache flushing local exlusive activation is needed.
This commit is contained in:
parent
c95d43b28c
commit
c2876ee1c9
@ -191,8 +191,9 @@ int lv_cache_remove(struct logical_volume *cache_lv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Active volume is needed (writeback only?) */
|
/* Active volume is needed (writeback only?) */
|
||||||
if (!activate_lv(cache_lv->vg->cmd, cache_lv)) {
|
if (!lv_is_active_locally(cache_lv) &&
|
||||||
log_error("Failed to active cache %s.", cache_lv->name);
|
!activate_lv_excl_local(cache_lv->vg->cmd, cache_lv)) {
|
||||||
|
log_error("Failed to active cache locally %s.", cache_lv->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user