diff mbox series

[21/29] lnet: obi2lnd: don't try to reconnect if there's no listener

Message ID 1619381316-7719-22-git-send-email-jsimmons@infradead.org (mailing list archive)
State New, archived
Headers show
Series lustre: Update to OpenSFS tree as of April 25, 2020 | expand

Commit Message

James Simmons April 25, 2021, 8:08 p.m. UTC
From: Li Dongyang <dongyangli@ddn.com>

For each discovery we try to reconnect up to retry_count times,
default to 5. during MDT mount process conf log, there will be
multiple discovery made for each OST.
If the OSTs are not up, the mount will have a long time out.

WC-bug-id: https://jira.whamcloud.com/browse/LU-14536
Lustre-commit: 67ba3ce23d32266e ("LU-14536 obi2lnd: don't try to reconnect if there's no listener")
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/42111
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Reviewed-by: Amir Shehata <ashehata@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 net/lnet/klnds/o2iblnd/o2iblnd.h    |  2 --
 net/lnet/klnds/o2iblnd/o2iblnd_cb.c | 16 ----------------
 2 files changed, 18 deletions(-)
diff mbox series

Patch

diff --git a/net/lnet/klnds/o2iblnd/o2iblnd.h b/net/lnet/klnds/o2iblnd/o2iblnd.h
index a5a66ee..c578673 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd.h
+++ b/net/lnet/klnds/o2iblnd/o2iblnd.h
@@ -510,8 +510,6 @@  struct kib_peer_ni {
 	unsigned char		ibp_races;
 	/* # consecutive reconnection attempts to this peer_ni */
 	unsigned int		ibp_reconnected;
-	/* number of total active retries */
-	unsigned int		ibp_retries;
 	/* errno on closing this peer_ni */
 	int			ibp_error;
 	/* max map_on_demand */
diff --git a/net/lnet/klnds/o2iblnd/o2iblnd_cb.c b/net/lnet/klnds/o2iblnd/o2iblnd_cb.c
index e5e5e02..de3b42e 100644
--- a/net/lnet/klnds/o2iblnd/o2iblnd_cb.c
+++ b/net/lnet/klnds/o2iblnd/o2iblnd_cb.c
@@ -2201,9 +2201,6 @@  static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 	/* connection established */
 	write_lock_irqsave(&kiblnd_data.kib_global_lock, flags);
 
-	/* reset retry count */
-	peer_ni->ibp_retries = 0;
-
 	conn->ibc_last_send = ktime_get();
 	kiblnd_set_conn_state(conn, IBLND_CONN_ESTABLISHED);
 	kiblnd_peer_alive(peer_ni);
@@ -2654,11 +2651,6 @@  static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 		goto out;
 	}
 
-	if (peer_ni->ibp_retries > *kiblnd_tunables.kib_retry_count) {
-		reason = "retry count exceeded due to no listener";
-		goto out;
-	}
-
 	switch (why) {
 	default:
 		reason = "Unknown";
@@ -2714,11 +2706,6 @@  static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 	case IBLND_REJECT_CONN_UNCOMPAT:
 		reason = "version negotiation";
 		break;
-
-	case IBLND_REJECT_INVALID_SRV_ID:
-		peer_ni->ibp_retries++;
-		reason = "invalid service id";
-		break;
 	}
 
 	conn->ibc_reconnect = 1;
@@ -2758,9 +2745,6 @@  static int kiblnd_map_tx(struct lnet_ni *ni, struct kib_tx *tx,
 
 	case IB_CM_REJ_INVALID_SERVICE_ID:
 		status = -EHOSTUNREACH;
-		peer_ni->ibp_retries++;
-		kiblnd_check_reconnect(conn, IBLND_MSG_VERSION, 0,
-				       IBLND_REJECT_INVALID_SRV_ID, NULL);
 		CNETERR("%s rejected: no listener at %d\n",
 			libcfs_nid2str(peer_ni->ibp_nid),
 			*kiblnd_tunables.kib_service);