Get rid of req->io_if

Remove one callback indirection level. I/O never changes it's direction
so there is no point in storing both read and write callbacks for each
request.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2022-09-02 17:52:01 +02:00
parent 64167576db
commit 228c5fc891
25 changed files with 182 additions and 353 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright(c) 2012-2021 Intel Corporation
* Copyright(c) 2012-2022 Intel Corporation
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "ocf/ocf.h"
@@ -85,10 +85,7 @@ void ocf_io_handle(struct ocf_io *io, void *opaque)
OCF_CHECK_NULL(req);
if (req->rw == OCF_WRITE)
req->io_if->write(req);
else
req->io_if->read(req);
req->engine_handler(req);
}
void ocf_queue_run_single(ocf_queue_t q)