Whamcloud - gitweb
b=23076 fix for o2iblnd reconnect
authorMaxim Patlasov <Maxim.Patlasov@sun.com>
Mon, 19 Jul 2010 09:37:57 +0000 (13:37 +0400)
committerMikhail Pershin <tappro@sun.com>
Tue, 20 Jul 2010 07:41:54 +0000 (11:41 +0400)
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

index 9532d7c..c228c83 100644 (file)
@@ -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;