Eliminate queue -> cache mapping
Eliminate need to resolve cache based on the queue. This allows to share the queue between cache instances. The queue still holds pointer to a cache that owns the queue, but no management or io path relies on the queue -> cache mapping. Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com> Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:

committed by
Michal Mielewczyk

parent
460cd461d3
commit
8b93b699c3
@@ -156,7 +156,7 @@ int metadata_io_read_i_atomic(ocf_cache_t cache, ocf_queue_t queue, void *priv,
|
||||
if (!context)
|
||||
return -OCF_ERR_NO_MEM;
|
||||
|
||||
context->req = ocf_req_new(queue, NULL, 0, 0, 0);
|
||||
context->req = ocf_req_new_mngt(cache, queue);
|
||||
if (!context->req) {
|
||||
env_vfree(context);
|
||||
return -OCF_ERR_NO_MEM;
|
||||
|
@@ -493,7 +493,7 @@ void raw_dynamic_load_all(ocf_cache_t cache, struct ocf_metadata_raw *raw,
|
||||
goto err_zpage;
|
||||
}
|
||||
|
||||
context->req = ocf_req_new_mngt(cache->mngt_queue);
|
||||
context->req = ocf_req_new_mngt(cache, cache->mngt_queue);
|
||||
if (!context->req) {
|
||||
result = -OCF_ERR_NO_MEM;
|
||||
goto err_req;
|
||||
|
Reference in New Issue
Block a user