Re: for-next iscsi target is broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Roland Dreier <roland@xxxxxxxxxxxxxxx>

 > bisected down to this one:
 > commit 93f62b0170e34b756e0f16ec9aaf8746f218f6da

Yikes, sorry about that.  Can you try the patch below?  Only the
second hunk is really needed, but the first hunk fixes some code that
looks pretty dumb.  I think the problem is that the code we ended up
with byte swaps the sn values one time too many.

Nic, assuming this fixes Sagi's test, can you fold this in?

 - Roland

---------- 8< ---------- 8< ----------

From: Roland Dreier <roland@xxxxxxxxxxxxxxx>
Date: Mon, 7 Sep 2015 09:08:37 -0700
Subject: [PATCH] fixup! target: Drop iSCSI use of mutex around max_cmd_sn
 increment

---

 drivers/target/iscsi/iscsi_target_device.c | 2 +-
 drivers/target/iscsi/iscsi_target_nego.c   | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/target/iscsi/iscsi_target_device.c b/drivers/target/iscsi/iscsi_target_device.c
index 07d2ef67dba6..eaa2f4ddac92 100644
--- a/drivers/target/iscsi/iscsi_target_device.c
+++ b/drivers/target/iscsi/iscsi_target_device.c
@@ -47,7 +47,7 @@ void iscsit_determine_maxcmdsn(struct iscsi_session *sess)
 	 * core_set_queue_depth_for_node().
 	 */
 	sess->cmdsn_window = se_nacl->queue_depth;
-	atomic_set(&sess->max_cmd_sn, (u32) atomic_read(&sess->max_cmd_sn) + se_nacl->queue_depth - 1);
+	atomic_add(se_nacl->queue_depth - 1, &sess->max_cmd_sn);
 }
 
 void iscsit_increment_maxcmdsn(struct iscsi_cmd *cmd, struct iscsi_session *sess)
diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c
index 74d041e815f4..4d08afe71e67 100644
--- a/drivers/target/iscsi/iscsi_target_nego.c
+++ b/drivers/target/iscsi/iscsi_target_nego.c
@@ -366,8 +366,6 @@ static int iscsi_target_do_tx_login_io(struct iscsi_conn *conn, struct iscsi_log
 		return -1;
 
 	login->rsp_length		= 0;
-	login_rsp->exp_cmdsn		= cpu_to_be32(login_rsp->exp_cmdsn);
-	login_rsp->max_cmdsn		= cpu_to_be32(login_rsp->max_cmdsn);
 
 	return 0;
 }
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux