Dynamic I/O queue management
- Queue allocation is now separated from starting cache. - Queue can be created and destroyed in runtime. - All queue ops accept queue handle instead of queue id. - Cache stores queues as list instead of array. Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com> Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:

committed by
Robert Baldyga

parent
1771228a46
commit
e53944d472
@@ -106,8 +106,7 @@ const struct ocf_io_if *ocf_get_io_if(ocf_req_cache_mode_t req_cache_mode)
|
||||
return cache_mode_io_if_map[req_cache_mode];
|
||||
}
|
||||
|
||||
struct ocf_request *ocf_engine_pop_req(struct ocf_cache *cache,
|
||||
struct ocf_queue *q)
|
||||
struct ocf_request *ocf_engine_pop_req(ocf_cache_t cache, ocf_queue_t q)
|
||||
{
|
||||
unsigned long lock_flags = 0;
|
||||
struct ocf_request *req;
|
||||
@@ -263,6 +262,7 @@ int ocf_engine_hndl_fast_req(struct ocf_request *req,
|
||||
ocf_req_cache_mode_t req_cache_mode)
|
||||
{
|
||||
const struct ocf_io_if *io_if;
|
||||
int ret;
|
||||
|
||||
io_if = ocf_get_io_if(req_cache_mode);
|
||||
if (!io_if)
|
||||
@@ -270,12 +270,16 @@ int ocf_engine_hndl_fast_req(struct ocf_request *req,
|
||||
|
||||
switch (req->rw) {
|
||||
case OCF_READ:
|
||||
return io_if->read(req);
|
||||
ret = io_if->read(req);
|
||||
break;
|
||||
case OCF_WRITE:
|
||||
return io_if->write(req);
|
||||
ret = io_if->write(req);
|
||||
break;
|
||||
default:
|
||||
return OCF_FAST_PATH_NO;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void ocf_engine_hndl_2dc_req(struct ocf_request *req)
|
||||
|
Reference in New Issue
Block a user