iser-target: Fix post_send_buf_count for RDMA READ/WRITE
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 27 Feb 2014 17:05:03 +0000 (09:05 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Mar 2014 04:38:22 +0000 (21:38 -0700)
commit0bf95498441319bcdba6fc4d8307091cd66bfc5e
treea4187e6f32d4521aeb62d833c894d8c8324249b0
parentd8bd97a03ce979b216df151e3b991023e6b72917
iser-target: Fix post_send_buf_count for RDMA READ/WRITE

commit b6b87a1df604678ed1be40158080db012a99ccca upstream.

This patch fixes the incorrect setting of ->post_send_buf_count
related to RDMA WRITEs + READs where isert_rdma_rw->send_wr_num
was not being taken into account.

This includes incrementing ->post_send_buf_count within
isert_put_datain() + isert_get_dataout(), decrementing within
__isert_send_completion() + isert_response_completion(), and
clearing wr->send_wr_num within isert_completion_rdma_read()

This is necessary because even though IB_SEND_SIGNALED is
not set for RDMA WRITEs + READs, during a QP failure event
the work requests will be returned with exception status
from the TX completion queue.

Acked-by: Sagi Grimberg <sagig@mellanox.com>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/ulp/isert/ib_isert.c