Reset repart flag during refreshing request status

The flag isn't reset before retraversation so it might be true even if cache
line was reparted in the meantime

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Michal Mielewczyk 2024-10-14 13:55:36 +02:00
parent 1ab882aa61
commit b3fa1fc96a

View File

@ -228,6 +228,12 @@ void ocf_engine_lookup(struct ocf_request *req)
ocf_engine_lookup_map_entry(cache, entry, core_id,
core_line);
/*
* The flag could have been set on the previous lookup, but
* cache line might be remapped in the meantime.
*/
entry->re_part = false;
if (entry->status != LOOKUP_HIT) {
/* There is miss then lookup for next map entry */
OCF_DEBUG_PARAM(cache, "Miss, core line = %llu",
@ -267,6 +273,11 @@ int ocf_engine_check(struct ocf_request *req)
core_line <= req->core_line_last; core_line++, i++) {
struct ocf_map_info *entry = &(req->map[i]);
/*
* The flag could have been set on the previous traverse, but
* cache line might be remapped in the meantime.
*/
entry->re_part = false;
if (entry->status == LOOKUP_MISS) {
continue;