Add missing lookup in engine_map()
Early return from engine_map() in case of insufficient free cachelines on the freelist is opportunistic, as both request map info and freelist count are not accurate. Map info is stale as it is to be refreshed in engine_map() after hash bucket lock had been upgraded. Freelist count on other hand is subject to change asynchronously. The implementation assumption however is that after engine_map() request is fully traversed (engine_map() is equivalent to engine_lookup() followed by an attempt to map missing cachelines). So in case of early return we must take care of repeating the lookup. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
e5fa15bdb2
commit
98124aa13d
@ -404,6 +404,7 @@ static void ocf_engine_map(struct ocf_request *req)
|
||||
|
||||
if (ocf_engine_unmapped_count(req) >
|
||||
ocf_freelist_num_free(cache->freelist)) {
|
||||
ocf_engine_lookup(req);
|
||||
ocf_req_set_mapping_error(req);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user