From 5497ef87b06fe8ba86d69f285bd771c55a89e28b Mon Sep 17 00:00:00 2001 From: Alexander Boyko Date: Wed, 14 Oct 2020 03:45:21 -0400 Subject: [PATCH] LU-14031 ptlrpc: remove unused code at pinger 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 Change-Id: Ia7a77b4ac19da768ebe1b0879d7123941f4490b5 Reviewed-by: Aurelien Degremont Reviewed-by: Alexey Lyashkov Reviewed-by: Oleg Drokin Reviewed-on: https://review.whamcloud.com/44250 Reviewed-by: Andreas Dilger Tested-by: jenkins Tested-by: Maloo --- lustre/ptlrpc/pinger.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c index f6f536c..ebdbbb5 100644 --- a/lustre/ptlrpc/pinger.c +++ b/lustre/ptlrpc/pinger.c @@ -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; -- 1.8.3.1