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

@@ -165,8 +165,9 @@ int ocf_read_pt(struct ocf_request *req)
return 0;
}
void ocf_queue_push_req_front_pt(struct ocf_request *req)
void ocf_queue_push_req_pt(struct ocf_request *req)
{
ocf_queue_push_req_front_cb(req, ocf_read_pt_do, true);
ocf_queue_push_req_cb(req, ocf_read_pt_do,
OCF_QUEUE_ALLOW_SYNC | OCF_QUEUE_PRIO_HIGH);
}