Move and rename ocf_engine_push_req_* from engine_common to ocf_queue_push_req_* in ocf_queue

Signed-off-by: Ian Levine <ian.levine@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Ian Levine
2023-10-12 15:00:06 +03:00
committed by Robert Baldyga
parent de32a9649a
commit 038126e9ab
24 changed files with 179 additions and 146 deletions

View File

@@ -217,7 +217,7 @@ static void _ocf_cleaner_complete_req(struct ocf_request *req)
if (master->complete_queue) {
ocf_req_get(master);
ocf_engine_push_req_front_cb(master,
ocf_queue_push_req_front_cb(master,
_ocf_cleaner_complete, true);
} else {
/* Only master contains completion function and priv */
@@ -232,7 +232,7 @@ static void _ocf_cleaner_complete_req(struct ocf_request *req)
static void _ocf_cleaner_on_resume(struct ocf_request *req)
{
OCF_DEBUG_TRACE(req->cache);
ocf_engine_push_req_front(req, true);
ocf_queue_push_req_front(req, true);
}
/*
@@ -336,7 +336,7 @@ static void _ocf_cleaner_metadata_io_end(struct ocf_request *req, int error)
OCF_DEBUG_MSG(req->cache, "Metadata flush finished");
req->engine_handler = _ocf_cleaner_fire_flush_cache;
ocf_engine_push_req_front(req, true);
ocf_queue_push_req_front(req, true);
}
static int _ocf_cleaner_update_metadata(struct ocf_request *req)
@@ -415,7 +415,7 @@ static void _ocf_cleaner_flush_cores_io_end(struct ocf_map_info *map,
* All core writes done, switch to post cleaning activities
*/
req->engine_handler = _ocf_cleaner_update_metadata;
ocf_engine_push_req_front(req, true);
ocf_queue_push_req_front(req, true);
}
static void _ocf_cleaner_flush_cores_io_cmpl(struct ocf_io *io, int error)
@@ -487,7 +487,7 @@ static void _ocf_cleaner_core_io_end(struct ocf_request *req)
* Move processing to thread, where IO will be (and can be) submitted
*/
req->engine_handler = _ocf_cleaner_fire_flush_cores;
ocf_engine_push_req_front(req, true);
ocf_queue_push_req_front(req, true);
}
static void _ocf_cleaner_core_io_cmpl(struct ocf_io *io, int error)
@@ -645,7 +645,7 @@ static void _ocf_cleaner_cache_io_end(struct ocf_request *req)
* Move processing to thread, where IO will be (and can be) submitted
*/
req->engine_handler = _ocf_cleaner_fire_core;
ocf_engine_push_req_front(req, true);
ocf_queue_push_req_front(req, true);
OCF_DEBUG_MSG(req->cache, "Cache reads finished");
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2023 Huawei Technologies
* Copyright(c) 2023-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -142,5 +142,5 @@ void ocf_parallelize_run(ocf_parallelize_t parallelize)
int i;
for (i = 0; i < parallelize->shards_cnt; i++)
ocf_engine_push_req_front(parallelize->reqs[i], false);
ocf_queue_push_req_front(parallelize->reqs[i], false);
}

View File

@@ -1,6 +1,6 @@
/*
* Copyright(c) 2019-2022 Intel Corporation
* Copyright(c) 2023 Huawei Technologies
* Copyright(c) 2023-2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -47,7 +47,7 @@ static int _ocf_pipeline_run_step(struct ocf_request *req)
if (step->pred(pipeline, pipeline->priv, &step->arg)) {
step->hndl(pipeline, pipeline->priv, &step->arg);
return 0;
}
}
continue;
case ocf_pipeline_step_foreach:
arg = &step->args[pipeline->next_arg++];
@@ -126,12 +126,12 @@ void *ocf_pipeline_get_priv(ocf_pipeline_t pipeline)
void ocf_pipeline_next(ocf_pipeline_t pipeline)
{
ocf_engine_push_req_front(pipeline->req, false);
ocf_queue_push_req_front(pipeline->req, false);
}
void ocf_pipeline_finish(ocf_pipeline_t pipeline, int error)
{
pipeline->finish = true;
pipeline->error = error;
ocf_engine_push_req_front(pipeline->req, false);
ocf_queue_push_req_front(pipeline->req, false);
}