[lustre-devel] [PATCH 04/18] lnet: Correct peer NI recovery age out calculation

James Simmons jsimmons at infradead.org
Mon Jul 19 05:31:59 PDT 2021


From: Chris Horn <chris.horn at hpe.com>

The calculation to age a peer NI out of recovery is only valid if
lnet_recovery_limit is non-zero. When set to zero, we allow peer NIs
to be in recovery indefinitely.

HPE-bug-id: LUS-9953
Fixes: b414b1afc8 ("lnet: Age peer NI out of recovery")
WC-bug-id: https://jira.whamcloud.com/browse/LU-14654
Lustre-commit: 8f3f0e1219724d6e ("LU-14654 lnet: Correct peer NI recovery age out calculation")
Signed-off-by: Chris Horn <chris.horn at hpe.com>
Reviewed-on: https://review.whamcloud.com/43501
Reviewed-by: Alexander Boyko <alexander.boyko at hpe.com>
Reviewed-by: Cyril Bordage <cbordage at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/peer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/lnet/lnet/peer.c b/net/lnet/lnet/peer.c
index 29c3372..224f4e2 100644
--- a/net/lnet/lnet/peer.c
+++ b/net/lnet/lnet/peer.c
@@ -4033,7 +4033,8 @@ int lnet_get_peer_info(struct lnet_ioctl_peer_cfg *cfg, void __user *bulk)
 		return;
 	}
 
-	if (now > lpni->lpni_last_alive + lnet_recovery_limit) {
+	if (lnet_recovery_limit &&
+	    now > lpni->lpni_last_alive + lnet_recovery_limit) {
 		CDEBUG(D_NET, "lpni %s aged out last alive %lld\n",
 		       libcfs_nid2str(lpni->lpni_nid),
 		       lpni->lpni_last_alive);
-- 
1.8.3.1



More information about the lustre-devel mailing list