remove ocf_io_start function

Signed-off-by: Damian Raczkowski <damian.raczkowski@intel.com>
This commit is contained in:
Damian Raczkowski 2022-10-28 13:36:09 +02:00
parent 43894dd4a5
commit d2ea41cdbc
11 changed files with 1 additions and 23 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 * SPDX-License-Identifier: BSD-3-Clause
*/ */
#include "ocf/ocf.h" #include "ocf/ocf.h"
@ -38,7 +38,6 @@ int ocf_io_d2c(struct ocf_request *req)
OCF_DEBUG_TRACE(req->cache); OCF_DEBUG_TRACE(req->cache);
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -243,7 +243,6 @@ int ocf_discard(struct ocf_request *req)
{ {
OCF_DEBUG_TRACE(req->cache); OCF_DEBUG_TRACE(req->cache);
ocf_io_start(&req->ioi.io);
if (req->rw == OCF_READ) { if (req->rw == OCF_READ) {
req->complete(req, -OCF_ERR_INVAL); req->complete(req, -OCF_ERR_INVAL);

View File

@ -125,7 +125,6 @@ int ocf_read_fast(struct ocf_request *req)
part_has_space = ocf_user_part_has_space(req); part_has_space = ocf_user_part_has_space(req);
if (hit && part_has_space) { if (hit && part_has_space) {
ocf_io_start(&req->ioi.io);
lock = ocf_req_async_lock_rd( lock = ocf_req_async_lock_rd(
ocf_cache_line_concurrency(req->cache), ocf_cache_line_concurrency(req->cache),
req, ocf_engine_on_resume); req, ocf_engine_on_resume);
@ -192,7 +191,6 @@ int ocf_write_fast(struct ocf_request *req)
part_has_space = ocf_user_part_has_space(req); part_has_space = ocf_user_part_has_space(req);
if (mapped && part_has_space) { if (mapped && part_has_space) {
ocf_io_start(&req->ioi.io);
lock = ocf_req_async_lock_wr( lock = ocf_req_async_lock_wr(
ocf_cache_line_concurrency(req->cache), ocf_cache_line_concurrency(req->cache),
req, ocf_engine_on_resume); req, ocf_engine_on_resume);

View File

@ -102,7 +102,6 @@ int ocf_read_pt(struct ocf_request *req)
OCF_DEBUG_TRACE(req->cache); OCF_DEBUG_TRACE(req->cache);
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -214,7 +214,6 @@ int ocf_read_generic(struct ocf_request *req)
int lock = OCF_LOCK_NOT_ACQUIRED; int lock = OCF_LOCK_NOT_ACQUIRED;
struct ocf_cache *cache = req->cache; struct ocf_cache *cache = req->cache;
ocf_io_start(&req->ioi.io);
if (env_atomic_read(&cache->pending_read_misses_list_blocked)) { if (env_atomic_read(&cache->pending_read_misses_list_blocked)) {
/* There are conditions to bypass IO */ /* There are conditions to bypass IO */

View File

@ -18,7 +18,6 @@
int ocf_write_wa(struct ocf_request *req) int ocf_write_wa(struct ocf_request *req)
{ {
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -167,7 +167,6 @@ int ocf_write_wb(struct ocf_request *req)
{ {
int lock = OCF_LOCK_NOT_ACQUIRED; int lock = OCF_LOCK_NOT_ACQUIRED;
ocf_io_start(&req->ioi.io);
/* Not sure if we need this. */ /* Not sure if we need this. */
ocf_req_get(req); ocf_req_get(req);

View File

@ -163,7 +163,6 @@ int ocf_write_wi(struct ocf_request *req)
OCF_DEBUG_TRACE(req->cache); OCF_DEBUG_TRACE(req->cache);
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -207,7 +207,6 @@ int ocf_read_wo(struct ocf_request *req)
OCF_DEBUG_TRACE(req->cache); OCF_DEBUG_TRACE(req->cache);
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -201,7 +201,6 @@ int ocf_write_wt(struct ocf_request *req)
{ {
int lock = OCF_LOCK_NOT_ACQUIRED; int lock = OCF_LOCK_NOT_ACQUIRED;
ocf_io_start(&req->ioi.io);
/* Get OCF request - increase reference counter */ /* Get OCF request - increase reference counter */
ocf_req_get(req); ocf_req_get(req);

View File

@ -46,17 +46,6 @@ struct ocf_io *ocf_io_new(ocf_volume_t volume, ocf_queue_t queue,
uint64_t addr, uint32_t bytes, uint32_t dir, uint64_t addr, uint32_t bytes, uint32_t dir,
uint32_t io_class, uint64_t flags); uint32_t io_class, uint64_t flags);
static inline void ocf_io_start(struct ocf_io *io)
{
/*
* We want to call start() callback only once, so after calling
* we set it to NULL to prevent multiple calls.
*/
if (io->start) {
io->start(io);
io->start = NULL;
}
}
static inline void ocf_io_end(struct ocf_io *io, int error) static inline void ocf_io_end(struct ocf_io *io, int error)
{ {