From: Zdenek Kabelac Date: Sat, 12 Oct 2019 09:12:11 +0000 (+0200) Subject: cache: reload only when switched to cleaner policy X-Git-Tag: v2_03_06~50 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=36944e1009e932902269d3eab547e0b19da13468;p=lvm2.git cache: reload only when switched to cleaner policy Reload cache target only when lvm2 reload table with cache with clearer policy. --- diff --git a/WHATS_NEW b/WHATS_NEW index d530d9f79..bb806ac22 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.03.06 - ================================ + Reload cleanered cache DM only with cleaner policy. Fix cmd return when zering of cachevol fails. Extend lvs to show all VDO properties. Preserve VDO write policy with vdopool. diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index 65589f7a1..e4cd34560 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -545,7 +545,7 @@ int lv_cache_wait_for_clean(struct logical_volume *cache_lv, int *is_clean) * TODO: add check if extra suspend resume is necessary * ATM this is workaround for missing cache sync when cache gets clean */ - if (1) { + if (cleaner_policy) { if (!lv_refresh_suspend_resume(lock_lv)) return_0;