From 88850e0c8eb2a0ac9d454d47dcbae70fd636f13d Mon Sep 17 00:00:00 2001 From: Maxim Patlasov Date: Mon, 19 Jul 2010 13:37:57 +0400 Subject: [PATCH 1/1] b=23076 fix for o2iblnd reconnect i=isaac Reconnect is still needed even when ibp_tx_queue is empty if ibp_version != version because reconnect may be initiated by kiblnd_query(). --- lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index 9532d7c..c228c83 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2377,8 +2377,12 @@ kiblnd_reconnect (kib_conn_t *conn, int version, cfs_write_lock_irqsave(&kiblnd_data.kib_global_lock, flags); /* retry connection if it's still needed and no other connection - * attempts (active or passive) are in progress */ - if (!cfs_list_empty(&peer->ibp_tx_queue) && + * attempts (active or passive) are in progress + * NB: reconnect is still needed even when ibp_tx_queue is + * empty if ibp_version != version because reconnect may be + * initiated by kiblnd_query() */ + if ((!cfs_list_empty(&peer->ibp_tx_queue) || + peer->ibp_version != version) && peer->ibp_connecting == 1 && peer->ibp_accepting == 0) { retry = 1; -- 1.8.3.1