Whamcloud - gitweb
LU-14031 ptlrpc: remove unused code at pinger
authorAlexander Boyko <c17825@cray.com>
Wed, 14 Oct 2020 07:45:21 +0000 (03:45 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 15 Jul 2021 15:29:09 +0000 (15:29 +0000)
The timeout_list was previously used for grant shrinking,
but right now is dead code.

Lustre-change: https://review.whamcloud.com/40243
Lustre-commit: f02266305941423a10e8e6ec33a5865e24c18432

HPE-bug-id: LUS-8520
Fixes: fc915a43786e ("LU-8708 osc: depart grant shrinking from pinger")
Signed-off-by: Alexander Boyko <alexander.boyko@hpe.com>
Change-Id: Ia7a77b4ac19da768ebe1b0879d7123941f4490b5
Reviewed-by: Aurelien Degremont <degremoa@amazon.com>
Reviewed-by: Alexey Lyashkov <alexey.lyashkov@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44250
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ptlrpc/pinger.c

index f6f536c..ebdbbb5 100644 (file)
@@ -176,27 +176,9 @@ static inline time64_t ptlrpc_next_reconnect(struct obd_import *imp)
 
 static timeout_t pinger_check_timeout(time64_t time)
 {
-       timeout_t timeout = PING_INTERVAL;
-       timeout_t next_timeout;
-       time64_t now;
-       struct list_head *iter;
-       struct obd_import *imp;
-
-       mutex_lock(&pinger_mutex);
-       now = ktime_get_seconds();
-       /* Process imports to find a nearest next ping */
-       list_for_each(iter, &pinger_imports) {
-               imp = list_entry(iter, struct obd_import, imp_pinger_chain);
-               if (!imp->imp_pingable || imp->imp_next_ping < now)
-                       continue;
-               next_timeout = imp->imp_next_ping - now;
-               /* make sure imp_next_ping in the future from time */
-               if (next_timeout > (now - time) && timeout > next_timeout)
-                       timeout = next_timeout;
-       }
-       mutex_unlock(&pinger_mutex);
+       time64_t timeout = PING_INTERVAL;
 
-       return timeout - (now - time);
+       return time + timeout - ktime_get_seconds();
 }
 
 static bool ir_up;