From 966d95029c9b5e1bba5859e64033c7dd728d4afc Mon Sep 17 00:00:00 2001 From: Rafal Stefanowski Date: Thu, 8 Oct 2026 15:51:23 +0200 Subject: [PATCH] prefetch: Assign prefetch requests to the correct IO class All user requests pass through the ocf_core_volume_submit_io() function which assign its 'part_id' from an internal 'io.io_class' field set when creating the request. When prefetch request is created in ocf_prefetch_range() function, only its 'io.io_class' field is set and since this request does not pass through ocf_core_volume_submit_io() the 'part_id' field is left with unchanged default which points to class 0. Because OCF uses 'part_id' to properly route the request, prefetch requests are inserted into partition 0 instead of the proper 33 which is reserved for prefetcher. Signed-off-by: Rafal Stefanowski --- src/prefetch/ocf_prefetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/prefetch/ocf_prefetch.c b/src/prefetch/ocf_prefetch.c index 4ce9c4e3..e9caf3e9 100644 --- a/src/prefetch/ocf_prefetch.c +++ b/src/prefetch/ocf_prefetch.c @@ -111,9 +111,9 @@ static void ocf_prefetch_range(struct ocf_request *req, ocf_pf_id_t pf_id, if (unlikely(!prefetch_req)) break; + prefetch_req->part_id = OCF_IO_CLASS_PREFETCH; prefetch_req->io.io_class = OCF_IO_CLASS_PREFETCH; prefetch_req->io.pf_id = pf_id; - prefetch_req->complete = _ocf_prefetch_complete; ocf_prefetch_read(prefetch_req);