From 7e9f2e6914cfd8bd344cc205d0edfd6c4427e29b Mon Sep 17 00:00:00 2001 From: Aurelien Degremont Date: Fri, 5 Jul 2024 15:04:19 +0200 Subject: [PATCH] LU-18004 ptlrpc: shrink timeout using MIN and not MAX value Change import_select_connection() to correctly use CONNECTION_SWITCH_MIN. When trying to set a small timeout for quick connection tests patch v2_15_61-238-g94d05d0737 wrongly used CONNECTION_SWITCH_MAX instead of CONNECTION_SWITCH_MIN. Fixes: 94d05d0737 ("LU-17379 mgc: try MGS nodes faster") Signed-off-by: Aurelien Degremont Change-Id: Ia85eac787441d7bef6fd47b083060bf14a8f9a31 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55639 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Mikhail Pershin Reviewed-by: Andreas Dilger Reviewed-by: Oleg Drokin --- lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index feb38df..47ed2e35 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -556,7 +556,7 @@ static int import_select_connection(struct obd_import *imp) /* make it quick at first round */ if (timeout > CONNECTION_SWITCH_MIN) - at_reset(at, CONNECTION_SWITCH_MAX); + at_reset(at, CONNECTION_SWITCH_MIN); } else if (imp->imp_conn_list.next == &imp_conn->oic_item) { struct adaptive_timeout *at = &imp->imp_at.iat_net_latency; timeout_t timeout = obd_at_get(imp->imp_obd, at); -- 1.8.3.1