ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Nov 22 17:59:08 EST 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=04d9cd1224e5bc9d6146bab2866cdc81deb9b509
Commit: 04d9cd1224e5bc9d6146bab2866cdc81deb9b509
Parent: 5e8e6b4b3adebf01a9d97056cbbfd8c44330df99
Author: Nicholas Bellinger <nab at linux-iscsi.org>
AuthorDate: Tue Nov 12 18:05:07 2013 -0800
Committer: Nicholas Bellinger <nab at linux-iscsi.org>
CommitDate: Tue Nov 12 18:05:07 2013 -0800
ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
This patch avoids a duplicate iscsit_increment_maxcmdsn() call for
ISER_IB_RDMA_WRITE within isert_map_rdma() + isert_reg_rdma_frwr(),
which will already be occuring once during isert_put_datain() ->
iscsit_build_rsp_pdu() operation.
It also removes the local conn->stat_sn assignment + increment,
and changes the third parameter to iscsit_build_rsp_pdu() to
signal this should be done by iscsi_target_mode code.
Tested-by: Moussa Ba <moussaba at micron.com>
Cc: <stable at vger.kernel.org> # v3.10+
Signed-off-by: Nicholas Bellinger <nab at linux-iscsi.org>
---
drivers/infiniband/ulp/isert/ib_isert.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index bbd86e8..5661075 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2029,8 +2029,6 @@ isert_map_rdma(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
if (wr->iser_ib_op == ISER_IB_RDMA_WRITE) {
data_left = se_cmd->data_length;
- iscsit_increment_maxcmdsn(cmd, conn->sess);
- cmd->stat_sn = conn->stat_sn++;
} else {
sg_off = cmd->write_data_done / PAGE_SIZE;
data_left = se_cmd->data_length - cmd->write_data_done;
@@ -2242,8 +2240,6 @@ isert_reg_rdma_frwr(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
if (wr->iser_ib_op == ISER_IB_RDMA_WRITE) {
data_left = se_cmd->data_length;
- iscsit_increment_maxcmdsn(cmd, conn->sess);
- cmd->stat_sn = conn->stat_sn++;
} else {
sg_off = cmd->write_data_done / PAGE_SIZE;
data_left = se_cmd->data_length - cmd->write_data_done;
@@ -2352,7 +2348,7 @@ isert_put_datain(struct iscsi_conn *conn, struct iscsi_cmd *cmd)
* Build isert_conn->tx_desc for iSCSI response PDU and attach
*/
isert_create_send_desc(isert_conn, isert_cmd, &isert_cmd->tx_desc);
- iscsit_build_rsp_pdu(cmd, conn, false, (struct iscsi_scsi_rsp *)
+ iscsit_build_rsp_pdu(cmd, conn, true, (struct iscsi_scsi_rsp *)
&isert_cmd->tx_desc.iscsi_header);
isert_init_tx_hdrs(isert_conn, &isert_cmd->tx_desc);
isert_init_send_wr(isert_conn, isert_cmd,
More information about the linux-mtd-cvs
mailing list