From 1fc4ed3ac40ab0e11b1c59d7d147a100636cbda0 Mon Sep 17 00:00:00 2001 From: Amir Shehata Date: Mon, 28 Aug 2017 15:22:57 -0700 Subject: [PATCH] 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 --- lnet/lnet/peer.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 1.8.3.1