Re: [PATCH] Fix cmd sequence numbering for login phase of discovery sessions

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

 



Arne Redlich wrote:
For discovery sessions the Exp- and the MaxCmdSNs are not set appropriately
during login phase. This leads to e.g. the OpenSolaris initiator not being able to
successfully perform a SendTargets discovery.
This patch also increases the CmdSN window size to avoid an issue previously observed
with the AIX initiator vs. IET (not tested - cf. IET svn rev. 22).

Signed-off-by: Arne Redlich <arne.redlich@xxxxxxxxxxxxxx>
---
 usr/iscsi/iscsid.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index bfaec87..c45eeb2 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -487,10 +487,12 @@ static void login_start(struct iscsi_connection *conn)
memcpy(conn->session_param, target->session_param,
 		       sizeof(conn->session_param));
-		conn->exp_cmd_sn = be32_to_cpu(req->cmdsn);
-		dprintf("exp_cmd_sn: %d,%d\n", conn->exp_cmd_sn, req->cmdsn);
-		conn->max_cmd_sn = conn->exp_cmd_sn;
 	}
+
+	conn->exp_cmd_sn = be32_to_cpu(req->cmdsn);
+	conn->max_cmd_sn = conn->exp_cmd_sn + 1;
+	dprintf("exp_cmd_sn: %d,%d\n", conn->exp_cmd_sn, req->cmdsn);
+
 	text_key_add(conn, "TargetPortalGroupTag", "1");
 }
Hi Arne,

I applied your patch and I can confirm that I am able to login using opensolaris into tgt on Fedora 9, in my case a tape target.
I am able to write and read to it fine.

Note that the Lun 0 controller make solaris generate messages in /var/adm/messages:

Mar 30 08:53:48 sunny iscsi: [ID 248668 kern.warning] WARNING: iscsi driver unable to online iqn.2008-09.com.example:server.tape lun 0

Albert


--
To unsubscribe from this list: send the line "unsubscribe stgt" 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]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux