diff mbox series

[389/622] lnet: honor discovery setting

Message ID 1582838290-17243-390-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: sync closely to 2.13.52 | expand

Commit Message

James Simmons Feb. 27, 2020, 9:14 p.m. UTC
From: Amir Shehata <ashehata@whamcloud.com>

If discovery is off do not push out any updates. This could be
triggered in case of a gateway's interface changing.

WC-bug-id: https://jira.whamcloud.com/browse/LU-12423
Lustre-commit: a06b656639c4 ("LU-12423 lnet: honor discovery setting")
Signed-off-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/35192
Reviewed-by: Olaf Weber <olaf.weber@hpe.com>
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/lnet/peer.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/net/lnet/lnet/peer.c b/net/lnet/lnet/peer.c
index e33dc0e..b0ca1de 100644
--- a/net/lnet/lnet/peer.c
+++ b/net/lnet/lnet/peer.c
@@ -877,6 +877,8 @@  struct lnet_peer_ni *
 	int cpt;
 
 	lnet_net_lock(LNET_LOCK_EX);
+	if (lnet_peer_discovery_disabled)
+		force = 0;
 	lncpt = cfs_percpt_number(the_lnet.ln_peer_tables);
 	for (cpt = 0; cpt < lncpt; cpt++) {
 		ptable = the_lnet.ln_peer_tables[cpt];