[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lustre-devel
Subject:    [lustre-devel] [PATCH 15/22] lnet: fix debug message in lnet_discovery_event_reply
From:       James Simmons <jsimmons () infradead ! org>
Date:       2022-11-20 14:17:01
Message-ID: 1668953828-10909-16-git-send-email-jsimmons () infradead ! org
[Download RAW message or body]

From: Serguei Smirnov <ssmirnov@whamcloud.com>

The message in lnet_discovery_event_reply currently says
"Peer X has discovery disabled" even though the same path
may be taken if discovery is disabled locally.
Change the debug message to indicate whether discovery is
disabled on the peer side or locally.

WC-bug-id: https://jira.whamcloud.com/browse/LU-16282
Lustre-commit: 9f45a79e983c11def ("LU-16282 lnet: fix debug message in lnet_discovery_event_reply")
Signed-off-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48997
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/lnet/peer.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/net/lnet/lnet/peer.c b/net/lnet/lnet/peer.c
index 52ad791..35b135e 100644
--- a/net/lnet/lnet/peer.c
+++ b/net/lnet/lnet/peer.c
@@ -2592,6 +2592,7 @@ static void lnet_peer_clear_discovery_error(struct lnet_peer *lp)
 	struct lnet_ping_buffer *pbuf;
 	int infobytes;
 	int rc;
+	bool ping_feat_disc;
 
 	spin_lock(&lp->lp_lock);
 
@@ -2629,14 +2630,15 @@ static void lnet_peer_clear_discovery_error(struct lnet_peer *lp)
 		goto out;
 	}
 
-	/*
-	 * The peer may have discovery disabled at its end. Set
+	/* The peer may have discovery disabled at its end. Set
 	 * NO_DISCOVERY as appropriate.
 	 */
-	if (!(pbuf->pb_info.pi_features & LNET_PING_FEAT_DISCOVERY) &&
-	    lnet_peer_discovery_disabled) {
-		CDEBUG(D_NET, "Peer %s has discovery enabled\n",
-		       libcfs_nidstr(&lp->lp_primary_nid));
+	ping_feat_disc = pbuf->pb_info.pi_features & LNET_PING_FEAT_DISCOVERY;
+	if (!ping_feat_disc || lnet_peer_discovery_disabled) {
+		CDEBUG(D_NET, "Peer %s has discovery %s, local discovery %s\n",
+		       libcfs_nidstr(&lp->lp_primary_nid),
+		       ping_feat_disc ? "enabled" : "disabled",
+		       lnet_peer_discovery_disabled ? "disabled" : "enabled");
 
 		/* Detect whether this peer has toggled discovery from on to
 		 * off and whether we can delete and re-create the peer. Peers
-- 
1.8.3.1

_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic