From: Amir Shehata Date: Mon, 28 Aug 2017 22:22:57 +0000 (-0700) Subject: LU-9917 lnet: rediscover peer if it changed X-Git-Tag: 2.10.53~16 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F28772%2F2;p=fs%2Flustre-release.git LU-9917 lnet: rediscover peer if it changed If the peer has changed after we unlocked the cpt then we'll need to discover the new peer. Signed-off-by: Amir Shehata Change-Id: Ib880746d5e67bbea1aa43122fa3aa115261c8664 Reviewed-on: https://review.whamcloud.com/28772 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Olaf Weber Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- diff --git a/lnet/lnet/peer.c b/lnet/lnet/peer.c index 232a06d..7865c71 100644 --- a/lnet/lnet/peer.c +++ b/lnet/lnet/peer.c @@ -2035,6 +2035,14 @@ again: 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)