[lustre-devel] [PATCH 33/37] lnet: Set remote NI status in lnet_notify

James Simmons jsimmons at infradead.org
Wed Jul 15 13:45:14 PDT 2020


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

The gnilnd receives node health information asynchronous from any tx
failure, so aliveness of lpni as reported by lnet_is_peer_ni_alive()
may not match what LND is telling us. Use existing reset flag to
set cached NI status down so we can be sure that remote NIs are
correctly set down.

HPE-bug-id: LUS-8897
WC-bug-id: https://jira.whamcloud.com/browse/LU-13648
Lustre-commit: 8010dbb660766 ("LU-13648 lnet: Set remote NI status in lnet_notify")
Signed-off-by: Chris Horn <chris.horn at hpe.com>
Reviewed-on: https://review.whamcloud.com/38862
Reviewed-by: Amir Shehata <ashehata at whamcloud.com>
Reviewed-by: Serguei Smirnov <ssmirnov at whamcloud.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/router.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/lnet/lnet/router.c b/net/lnet/lnet/router.c
index c0578d9..e3b3e71 100644
--- a/net/lnet/lnet/router.c
+++ b/net/lnet/lnet/router.c
@@ -1671,8 +1671,7 @@ bool lnet_router_checker_active(void)
 
 	CDEBUG(D_NET, "%s notifying %s: %s\n",
 	       !ni ? "userspace" : libcfs_nid2str(ni->ni_nid),
-	       libcfs_nid2str(nid),
-	       alive ? "up" : "down");
+	       libcfs_nid2str(nid), alive ? "up" : "down");
 
 	if (ni &&
 	    LNET_NIDNET(ni->ni_nid) != LNET_NIDNET(nid)) {
@@ -1714,6 +1713,7 @@ bool lnet_router_checker_active(void)
 
 	if (alive) {
 		if (reset) {
+			lpni->lpni_ns_status = LNET_NI_STATUS_UP;
 			lnet_set_lpni_healthv_locked(lpni,
 						     LNET_MAX_HEALTH_VALUE);
 		} else {
@@ -1726,6 +1726,8 @@ bool lnet_router_checker_active(void)
 						     (sensitivity) ? sensitivity :
 						     lnet_health_sensitivity);
 		}
+	} else if (reset) {
+		lpni->lpni_ns_status = LNET_NI_STATUS_DOWN;
 	}
 
 	/* recalculate aliveness */
-- 
1.8.3.1



More information about the lustre-devel mailing list