Added a priority queue for the request instead of push front

Now the request can be pushed to a high priority queue (instead of ocf_queue_push_req_front)
and to a low priority queue (instead of ocf_queue_push_req_back).
Both functions were merged into one function (ocf_queue_push_req) and instead of the
allow_sync parameter there is now a flags parameter that can be an OR combination of
OCF_QUEUE_ALLOW_SYNC and OCF_QUEUE_PRIO_HIGH

Signed-off-by: Ian Levine <ian.levine@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Ian Levine
2023-10-12 22:19:18 +03:00
committed by Robert Baldyga
parent 4f2d5c22d6
commit ac1b6b774a
23 changed files with 90 additions and 131 deletions

View File

@@ -402,7 +402,7 @@ static void _ocf_mngt_flush_portion_end(void *private_data, int error)
return;
}
ocf_queue_push_req_back(fc->req, false);
ocf_queue_push_req(fc->req, 0);
}
@@ -452,7 +452,7 @@ static void _ocf_mngt_flush_container(
fc->ticks1 = 0;
fc->ticks2 = UINT_MAX;
ocf_queue_push_req_back(fc->req, true);
ocf_queue_push_req(fc->req, OCF_QUEUE_ALLOW_SYNC);
return;
finish: