Verify standby/active cache state in OCF entry points

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2022-03-23 15:03:50 +01:00
parent e741160f8d
commit 4a839cd332
11 changed files with 174 additions and 1 deletions

View File

@@ -97,6 +97,11 @@ void ocf_cleaner_run(ocf_cleaner_t cleaner, ocf_queue_t queue)
return;
}
if (ocf_cache_is_standby(cache)) {
cleaner->end(cleaner, SLEEP_TIME_MS);
return;
}
/* Sleep in case there is management operation in progress. */
if (ocf_mngt_cache_trylock(cache)) {
cleaner->end(cleaner, SLEEP_TIME_MS);