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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user