1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

cache: enforce local exlusive activation

For cache flushing local exlusive activation is needed.
This commit is contained in:
Zdenek Kabelac 2014-04-01 21:29:28 +02:00
parent c95d43b28c
commit c2876ee1c9

View File

@ -191,8 +191,9 @@ int lv_cache_remove(struct logical_volume *cache_lv)
}
/* Active volume is needed (writeback only?) */
if (!activate_lv(cache_lv->vg->cmd, cache_lv)) {
log_error("Failed to active cache %s.", cache_lv->name);
if (!lv_is_active_locally(cache_lv) &&
!activate_lv_excl_local(cache_lv->vg->cmd, cache_lv)) {
log_error("Failed to active cache locally %s.", cache_lv->name);
return 0;
}