diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-01 21:29:28 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-04-01 21:29:28 +0200 |
commit | c2876ee1c9086bd4c0a8e898e05919cfcb6aded7 (patch) | |
tree | 8b183a92bd5eea54726fadaec554e5065a146a4c | |
parent | c95d43b28c5f89e1d96f2b16805ecd74eb4b02fb (diff) | |
download | lvm2-c2876ee1c9086bd4c0a8e898e05919cfcb6aded7.tar.gz |
cache: enforce local exlusive activation
For cache flushing local exlusive activation is needed.
-rw-r--r-- | lib/metadata/cache_manip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index b71e9e0d7..9a055e8bc 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -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; } |