[lustre-devel] [PATCH 15/22] lnet: fix debug message in lnet_discovery_event_reply
James Simmons <[email protected]>
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Serguei Smirnov <[email protected]> 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 <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48997 Reviewed-by: Neil Brown <[email protected]> Reviewed-by: Frank Sehr <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- 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 [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org