master - cache: enforce local exlusive activation
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c2876ee1c9086bd4c0a8e898e05919cfcb6aded7 Commit: c2876ee1c9086bd4c0a8e898e05919cfcb6aded7 Parent: c95d43b28c5f89e1d96f2b16805ecd74eb4b02fb Author: Zdenek Kabelac <[email protected]> AuthorDate: Tue Apr 1 21:29:28 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Tue Apr 1 21:29:28 2014 +0200
cache: enforce local exlusive activation
For cache flushing local exlusive activation is needed.
--- lib/metadata/cache_manip.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
lib/metadata/cache_manip.c +3 -2
@@ -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 ; }