From f8e8d74539b0a54a4f4ab9b334208f479ba8643c Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Thu, 15 Sep 2022 13:16:08 +0200 Subject: [PATCH] attach: setup promotion policy before cleaning Signed-off-by: Michal Mielewczyk --- src/mngt/ocf_mngt_cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mngt/ocf_mngt_cache.c b/src/mngt/ocf_mngt_cache.c index 68f93cf..cee7c1b 100644 --- a/src/mngt/ocf_mngt_cache.c +++ b/src/mngt/ocf_mngt_cache.c @@ -1220,6 +1220,8 @@ static void _ocf_mngt_attach_init_services(ocf_pipeline_t pipeline, ocf_cache_t cache = context->cache; ocf_error_t result; + __setup_promotion_policy(cache); + if (context->metadata.cleaner_disabled) __set_cleaning_policy(cache, ocf_cleaning_nop); @@ -1230,8 +1232,6 @@ static void _ocf_mngt_attach_init_services(ocf_pipeline_t pipeline, OCF_PL_FINISH_RET(pipeline, result); } - __setup_promotion_policy(cache); - /* In initial cache state there is no dirty data, so all dirty data is considered to be flushed */