Cleaner context ref counter

To prevent deinitializing cleaner context (i.e. during switching policy) during
processing requests, access to cleaner should be protected with reference
counter

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk
2021-07-20 10:49:30 +02:00
parent f33a6e5ce0
commit b83da68f85
4 changed files with 65 additions and 4 deletions

View File

@@ -205,6 +205,8 @@ static ocf_error_t __init_cleaning_policy(ocf_cache_t cache)
OCF_ASSERT_PLUGGED(cache);
ocf_refcnt_init(&cache->cleaner.refcnt);
for (i = 0; i < ocf_cleaning_max; i++)
ocf_cleaning_setup(cache, i);