Do not exclude used cachelines from flushing

Lower layer is prepared to handle used cachelines by
acquiring asynchronus read lock. It is very likely that
by the time the cacheline is actually cleaned its lock
state changes. So checking the lock at the moment of
constructing dirty cachelines list makes little sense.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2020-03-19 21:01:34 -04:00
parent 61983c946c
commit c17beec7d4

View File

@ -166,9 +166,6 @@ static int _ocf_mngt_get_sectors(ocf_cache_t cache, ocf_core_id_t core_id,
if (!metadata_test_dirty(cache, i))
continue;
if (ocf_cache_line_is_used(cache, i))
continue;
/* It's core_id cacheline and it's valid and it's dirty! */
p[j].cache_line = i;
p[j].core_line = core_line;
@ -261,9 +258,6 @@ static int _ocf_mngt_get_flush_containers(ocf_cache_t cache,
if (!metadata_test_dirty(cache, i))
continue;
if (ocf_cache_line_is_used(cache, i))
continue;
curr = &fc[core_revmap[core_id]];
ENV_BUG_ON(curr->iter >= curr->count);