From a394dd06a8e43f65b059ce5f36882c5481b7dc02 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Tue, 6 Jul 2021 14:00:54 +0200 Subject: [PATCH] Unlock cachelines after failed remap All remapped cachelines are write locked. If the operation fails cachelines has to be unlocked during rollback Signed-off-by: Michal Mielewczyk --- src/engine/engine_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine/engine_common.c b/src/engine/engine_common.c index 0e62b73..7937f29 100644 --- a/src/engine/engine_common.c +++ b/src/engine/engine_common.c @@ -328,6 +328,7 @@ static void ocf_engine_map_hndl_error(struct ocf_cache *cache, { uint32_t i; struct ocf_map_info *entry; + struct ocf_alock *alock = ocf_cache_line_concurrency(req->cache); for (i = 0; i < req->core_line_count; i++) { entry = &(req->map[i]); @@ -352,6 +353,10 @@ static void ocf_engine_map_hndl_error(struct ocf_cache *cache, ocf_metadata_end_collision_shared_access(cache, entry->coll_idx); + + ocf_alock_mark_index_locked(alock, req, i, false); + + ocf_cache_line_unlock_wr(alock, entry->coll_idx); break; default: