Whamcloud - gitweb
LU-18004 ptlrpc: shrink timeout using MIN and not MAX value 39/55639/3
authorAurelien Degremont <adegremont@nvidia.com>
Fri, 5 Jul 2024 13:04:19 +0000 (15:04 +0200)
committerOleg Drokin <green@whamcloud.com>
Sat, 13 Jul 2024 20:58:16 +0000 (20:58 +0000)
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 <adegremont@nvidia.com>
Change-Id: Ia85eac787441d7bef6fd47b083060bf14a8f9a31
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55639
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/ptlrpc/import.c

index feb38df..47ed2e3 100644 (file)
@@ -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);