From ab81ac667b0013f0bbb6137508b7bb13c50e08d5 Mon Sep 17 00:00:00 2001 From: Jan Musial Date: Tue, 16 Jan 2024 12:18:42 +0100 Subject: [PATCH] Remove unused fields Signed-off-by: Jan Musial Signed-off-by: Robert Baldyga --- modules/cas_cache/exp_obj.h | 4 +--- modules/cas_cache/layer_cache_management.c | 16 ---------------- modules/cas_cache/volume/obj_blk.h | 7 +------ 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/modules/cas_cache/exp_obj.h b/modules/cas_cache/exp_obj.h index 1c53657..be52f5a 100644 --- a/modules/cas_cache/exp_obj.h +++ b/modules/cas_cache/exp_obj.h @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation +* Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ #ifndef __CASDISK_EXP_OBJ_H__ @@ -46,9 +47,6 @@ struct cas_exp_obj { struct blk_mq_tag_set tag_set; - atomic_t pt_ios; - atomic_t *pending_rqs; - void *private; }; diff --git a/modules/cas_cache/layer_cache_management.c b/modules/cas_cache/layer_cache_management.c index 15ef0e7..adfb485 100644 --- a/modules/cas_cache/layer_cache_management.c +++ b/modules/cas_cache/layer_cache_management.c @@ -3504,22 +3504,6 @@ put: return result; } -static int cache_mngt_wait_for_rq_finish_visitor(ocf_core_t core, void *cntx) -{ - ocf_volume_t obj = ocf_core_get_volume(core); - struct bd_object *bdobj = bd_object(obj); - - while (atomic64_read(&bdobj->pending_rqs)) - io_schedule(); - - return 0; -} - -void cache_mngt_wait_for_rq_finish(ocf_cache_t cache) -{ - ocf_core_visit(cache, cache_mngt_wait_for_rq_finish_visitor, NULL, true); -} - int cache_mngt_set_core_params(struct kcas_set_core_param *info) { ocf_cache_t cache; diff --git a/modules/cas_cache/volume/obj_blk.h b/modules/cas_cache/volume/obj_blk.h index 281446e..870698b 100644 --- a/modules/cas_cache/volume/obj_blk.h +++ b/modules/cas_cache/volume/obj_blk.h @@ -1,5 +1,6 @@ /* * Copyright(c) 2012-2022 Intel Corporation +* Copyright(c) 2024 Huawei Technologies * SPDX-License-Identifier: BSD-3-Clause */ @@ -25,12 +26,6 @@ struct bd_object { uint32_t opened_by_bdev : 1; /*!< Opened by supplying bdev manually */ - atomic64_t pending_rqs; - /*!< This fields describes in flight IO requests */ - - struct workqueue_struct *btm_wq; - /*< Workqueue for I/O internally trigerred in bottom vol */ - struct workqueue_struct *expobj_wq; /*< Workqueue for I/O handled by top vol */