[lustre-devel] [PATCH 032/151] lnet: rediscover peer if it changed
James Simmons
jsimmons at infradead.org
Mon Sep 30 11:54:51 PDT 2019
From: Amir Shehata <ashehata at whamcloud.com>
If the peer has changed after we unlocked the cpt then
we'll need to discover the new peer.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9917
Lustre-commit: 1fc4ed3ac40a ("LU-9917 lnet: rediscover peer if it changed")
Signed-off-by: Amir Shehata <ashehata at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/28772
Reviewed-by: Olaf Weber <olaf.weber at hpe.com>
Reviewed-by: John L. Hammond <jhammond 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 | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/net/lnet/lnet/peer.c b/net/lnet/lnet/peer.c
index ade7f23..34e61f8 100644
--- a/net/lnet/lnet/peer.c
+++ b/net/lnet/lnet/peer.c
@@ -2034,6 +2034,13 @@ static void lnet_peer_clear_discovery_error(struct lnet_peer *lp)
lnet_net_unlock(LNET_LOCK_EX);
lnet_net_lock(cpt);
+ /* If the peer has changed after we've discovered the older peer,
+ * then we need to discovery the new peer to make sure the
+ * interface information is up to date
+ */
+ if (lp != lpni->lpni_peer_net->lpn_peer)
+ goto again;
+
if (signal_pending(current))
rc = -EINTR;
else if (the_lnet.ln_dc_state != LNET_DC_STATE_RUNNING)
--
1.8.3.1
More information about the lustre-devel
mailing list