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

@@ -91,9 +91,8 @@ static void volume_submit_discard(struct ocf_io *io)
void volume_forward_io(ocf_volume_t volume, ocf_forward_token_t token,
int dir, uint64_t addr, uint64_t bytes, uint64_t offset)
{
struct ocf_io *io = ocf_forward_get_io(token);
struct myvolume *myvolume = ocf_volume_get_priv(volume);
struct volume_data *data = ocf_io_get_data(io);
struct volume_data *data = ocf_forward_get_data(token);
if (dir == OCF_WRITE) {
memcpy(myvolume->mem + addr,