Introduce ocf_forward_get_data()

Skip the ocf_io abstraction and get the data directly from the request.

Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@huawei.com>
This commit is contained in:
Robert Baldyga
2023-10-12 17:34:36 +02:00
committed by Michal Mielewczyk
parent 54f75ba492
commit 6aa141c247
5 changed files with 30 additions and 11 deletions

View File

@@ -559,6 +559,13 @@ struct ocf_io *ocf_forward_get_io(ocf_forward_token_t token)
return &req->ioi.io;
}
ctx_data_t *ocf_forward_get_data(ocf_forward_token_t token)
{
struct ocf_request *req = (struct ocf_request *)(token & ~1);
return req->data;
}
static inline void _ocf_forward_get(ocf_forward_token_t token)
{
struct ocf_request *req = (struct ocf_request *)(token & ~1);