From d5051f374799bed527aa66d95ed270719747882f Mon Sep 17 00:00:00 2001 From: Timothy Day Date: Fri, 14 Jul 2023 15:42:39 +0000 Subject: [PATCH] LU-16965 obd: remove unused obd_evict_inprogress Remove the atomic_t struct field obd_evict_inprogress from 'struct obd_device'. This field was only ever incremented in a unused function that was removed in a previous patch. Hence, remove it altogther. This patch also removes the associated wait queue. Test-Parameters: trivial Signed-off-by: Timothy Day Change-Id: Id151c1e6a0adde8c1aeb6dbc903b9d98d00fd21d Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51681 Reviewed-by: Patrick Farrell Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lustre/include/obd.h | 2 -- lustre/ldlm/ldlm_lib.c | 5 ----- lustre/obdclass/genops.c | 1 - lustre/target/tgt_handler.c | 9 --------- 4 files changed, 17 deletions(-) diff --git a/lustre/include/obd.h b/lustre/include/obd.h index bbe2bf2..effdfd3 100644 --- a/lustre/include/obd.h +++ b/lustre/include/obd.h @@ -731,8 +731,6 @@ struct obd_device { const struct attribute **obd_attrs; struct lprocfs_vars *obd_vars; struct ldebugfs_vars *obd_debugfs_vars; - atomic_t obd_evict_inprogress; - wait_queue_head_t obd_evict_inprogress_waitq; struct list_head obd_evict_list; /* protected with pet_lock */ atomic_t obd_eviction_count; diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index 371ae8e..51db8ff 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -3516,11 +3516,6 @@ int target_bulk_io(struct obd_export *exp, struct ptlrpc_bulk_desc *desc) ENTRY; - /* If there is eviction in progress, wait for it to finish. */ - wait_event_idle( - exp->exp_obd->obd_evict_inprogress_waitq, - !atomic_read(&exp->exp_obd->obd_evict_inprogress)); - /* Check if client was evicted or reconnected already. */ if (exp->exp_failed || exp->exp_conn_cnt > lustre_msg_get_conn_cnt(req->rq_reqmsg)) { diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 3ebb015..b037a14 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -398,7 +398,6 @@ struct obd_device *class_newdev(const char *type_name, const char *name, /* recovery data */ spin_lock_init(&newdev->obd_recovery_task_lock); init_waitqueue_head(&newdev->obd_next_transno_waitq); - init_waitqueue_head(&newdev->obd_evict_inprogress_waitq); INIT_LIST_HEAD(&newdev->obd_req_replay_queue); INIT_LIST_HEAD(&newdev->obd_lock_replay_queue); INIT_LIST_HEAD(&newdev->obd_final_req_queue); diff --git a/lustre/target/tgt_handler.c b/lustre/target/tgt_handler.c index 062d7d6..aab4309 100644 --- a/lustre/target/tgt_handler.c +++ b/lustre/target/tgt_handler.c @@ -2346,15 +2346,6 @@ int tgt_brw_read(struct tgt_session_info *tsi) CFS_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_BULK, cfs_fail_val > 0 ? cfs_fail_val : (obd_timeout + 1) / 4); - /* Check if there is eviction in progress, and if so, wait for it to - * finish */ - if (unlikely(atomic_read(&exp->exp_obd->obd_evict_inprogress))) { - /* We do not care how long it takes */ - wait_event_idle( - exp->exp_obd->obd_evict_inprogress_waitq, - !atomic_read(&exp->exp_obd->obd_evict_inprogress)); - } - /* There must be big cache in current thread to process this request * if it is NULL then something went wrong and it wasn't allocated, * report -ENOMEM in that case */ -- 1.8.3.1