From: Amir Shehata Date: Thu, 22 Feb 2018 00:21:02 +0000 (-0800) Subject: LU-10682 lnd: pending transmits dropped silently X-Git-Tag: 2.10.4-RC1~56 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cfe31e7b2dc68bad1175d313c05e1aaa4d519c86;p=fs%2Flustre-release.git LU-10682 lnd: pending transmits dropped silently list_add was being used erroneously. The logic should be to move the txs on ibp_tx_queue on a local list which is then processed. The code, however, did the reverse, which would result in the pending txs not processed and thus dropped silently. This in turn would lead to peers reference counts at the LNet layer not decremented since lnet_finalize() might not be called for a message. Initialize local list and use list_splice_init() to move transmits on the ibp_tx_queue to the local list. Lustre-change: https://review.whamcloud.com/31374 Lustre-commit: f5c6228f0351787aefb76cb8f807eede3371ea2e Signed-off-by: Amir Shehata Change-Id: I6b36f709db2c89e53e0b3354883a8a1b1052a1dd Reviewed-by: Doug Oucharek Reviewed-by: Sonia Sharma Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31520 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- diff --git a/lnet/klnds/o2iblnd/o2iblnd_cb.c b/lnet/klnds/o2iblnd/o2iblnd_cb.c index 8db6c2d..9e01f97 100644 --- a/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2158,8 +2158,8 @@ kiblnd_connreq_done(kib_conn_t *conn, int status) } /* grab pending txs while I have the lock */ - list_add(&txs, &peer_ni->ibp_tx_queue); - list_del_init(&peer_ni->ibp_tx_queue); + INIT_LIST_HEAD(&txs); + list_splice_init(&peer_ni->ibp_tx_queue, &txs); if (!kiblnd_peer_active(peer_ni) || /* peer_ni has been deleted */ conn->ibc_comms_error != 0) { /* error has happened already */