cleaner: Remove complete_queue
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
parent
db6b009ef5
commit
1e5eda68a7
@ -195,9 +195,6 @@ struct ocf_request {
|
||||
uint8_t part_evict : 1;
|
||||
/* !< Some cachelines from request's partition must be evicted */
|
||||
|
||||
uint8_t complete_queue : 1;
|
||||
/* !< Request needs to be completed from the queue context */
|
||||
|
||||
uint8_t lock_idx : OCF_METADATA_GLOBAL_LOCK_IDX_BITS;
|
||||
/* !< Selected global metadata read lock */
|
||||
|
||||
|
@ -104,7 +104,6 @@ static struct ocf_request *_ocf_cleaner_alloc_master_req(
|
||||
/* In master, save completion context and function */
|
||||
req->priv = attribs->cmpl_context;
|
||||
req->master_io_req = attribs->cmpl_fn;
|
||||
req->complete_queue = attribs->cmpl_queue;
|
||||
|
||||
/* The count of all requests */
|
||||
env_atomic_set(&req->master_remaining, 1);
|
||||
@ -178,17 +177,6 @@ static void _ocf_cleaner_set_error(struct ocf_request *req)
|
||||
master->error = -OCF_ERR_IO;
|
||||
}
|
||||
|
||||
static int _ocf_cleaner_complete(struct ocf_request *master)
|
||||
{
|
||||
ocf_req_end_t cmpl;
|
||||
|
||||
cmpl = master->master_io_req;
|
||||
cmpl(master->priv, master->error);
|
||||
ocf_req_put(master);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void _ocf_cleaner_complete_req(struct ocf_request *req)
|
||||
{
|
||||
struct ocf_request *master = NULL;
|
||||
@ -215,11 +203,6 @@ static void _ocf_cleaner_complete_req(struct ocf_request *req)
|
||||
|
||||
OCF_DEBUG_MSG(req->cache, "All cleaning request completed");
|
||||
|
||||
if (master->complete_queue) {
|
||||
ocf_req_get(master);
|
||||
ocf_engine_push_req_front_cb(master,
|
||||
_ocf_cleaner_complete, true);
|
||||
} else {
|
||||
/* Only master contains completion function and priv */
|
||||
cmpl = master->master_io_req;
|
||||
cmpl(master->priv, master->error);
|
||||
@ -227,7 +210,6 @@ static void _ocf_cleaner_complete_req(struct ocf_request *req)
|
||||
/* For additional get on master allocation */
|
||||
ocf_req_put(master);
|
||||
}
|
||||
}
|
||||
|
||||
static void _ocf_cleaner_on_resume(struct ocf_request *req)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user