iser-target: Fix command leak for tx_desc->comp_llnode_batch
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 2 Mar 2014 22:51:12 +0000 (14:51 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 5 Mar 2014 01:54:10 +0000 (17:54 -0800)
commitebbe442183b7b8192c963266f1c89048fefc63a5
treec8d5621dcc0010161236ba3a6342d87f248cfde5
parent9bb4ca68fc48eea618b1af1c1cde2a251ae32d1b
iser-target: Fix command leak for tx_desc->comp_llnode_batch

This patch addresses a number of active I/O shutdown issues
related to isert_cmd descriptors being leaked that are part
of a completion interrupt coalescing batch.

This includes adding logic in isert_cq_tx_comp_err() to
drain any associated tx_desc->comp_llnode_batch, as well
as isert_cq_drain_comp_llist() to drain any associated
isert_conn->conn_comp_llist.

Also, set tx_desc->llnode_active in isert_init_send_wr()
in order to determine when work requests need to be skipped
in isert_cq_tx_work() exception path code.

Finally, update isert_init_send_wr() to only allow interrupt
coalescing when ISER_CONN_UP.

Acked-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Cc: <stable@vger.kernel.org> #3.13+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/isert/ib_isert.c
drivers/infiniband/ulp/isert/ib_isert.h