Whamcloud - gitweb
LU-16965 obd: remove unused obd_evict_inprogress 81/51681/2
authorTimothy Day <timday@amazon.com>
Fri, 14 Jul 2023 15:42:39 +0000 (15:42 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 Jul 2023 07:24:32 +0000 (07:24 +0000)
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 <timday@amazon.com>
Change-Id: Id151c1e6a0adde8c1aeb6dbc903b9d98d00fd21d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51681
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/include/obd.h
lustre/ldlm/ldlm_lib.c
lustre/obdclass/genops.c
lustre/target/tgt_handler.c

index bbe2bf2..effdfd3 100644 (file)
@@ -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;
 
index 371ae8e..51db8ff 100644 (file)
@@ -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)) {
index 3ebb015..b037a14 100644 (file)
@@ -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);
index 062d7d6..aab4309 100644 (file)
@@ -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 */