From: Frank Sehr Date: Thu, 9 Mar 2023 01:36:37 +0000 (-0800) Subject: LU-16260 lnet: enforce a positive minimum for lnd_timeout X-Git-Tag: 2.15.55~12 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3b4bd39beb95c8988dd95b26e22b2cfae6f99f7e;p=fs%2Flustre-release.git LU-16260 lnet: enforce a positive minimum for lnd_timeout Set the lnet_lnd_timeout to at least 1 second. The lnd_timeout is calculated using the following formula: max((lnet_transaction_timeout - 1) / (lnet_retry_count + 1), 1U); Signed-off-by: Frank Sehr Change-Id: I64fd133974bd1f60ff3d7354bf9e0990c56d4c04 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50236 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Chris Horn Reviewed-by: Serguei Smirnov Reviewed-by: Cyril Bordage Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/api-ni.c b/lnet/lnet/api-ni.c index 3c63f94..4134add 100644 --- a/lnet/lnet/api-ni.c +++ b/lnet/lnet/api-ni.c @@ -278,8 +278,8 @@ MODULE_PARM_DESC(lock_prim_nid, unsigned int lnet_lnd_timeout = LNET_LND_TIMEOUT_DEFAULT; static void lnet_set_lnd_timeout(void) { - lnet_lnd_timeout = (lnet_transaction_timeout - 1) / - (lnet_retry_count + 1); + lnet_lnd_timeout = max((lnet_transaction_timeout - 1) / + (lnet_retry_count + 1), 1U); } /*