[stgt] stgtd 0.9.3 : Read-Errors using iser transport

Or Gerlitz ogerlitz at Voltaire.com
Thu Feb 26 15:44:40 CET 2009


Dr. Volker Jaenisch wrote:
> Please feed me with fresh testing setups to narrow the issue further.
> We may also provide direct access to our testing machines if this is of help.

Hi,

Sorry, but we still don't have much progress on this bug. As I said, when
testing with the initiator under which the problem reproduces against a different
iser target, I didn't see the problem, but this test changed two many params (different
target machines, OSs, speeds, etc). The below patch spawns hooks for catching a possible
bug in stgt that can explain the problem you see. In our setup we didn't have hits, would
be nice if you can try it on yours.

Or.

Index: tgt/usr/iscsi/iscsi_rdma.c
===================================================================
--- tgt.orig/usr/iscsi/iscsi_rdma.c
+++ tgt/usr/iscsi/iscsi_rdma.c
@@ -126,6 +126,7 @@ struct conn_info {
 	/* read and write from the initiator's point of view */
 	uint32_t rem_read_stag, rem_write_stag;
 	uint64_t rem_read_va, rem_write_va;
+	int    task_flag;
 
 	enum {
 	    LOGIN_PHASE_START,      /* keep 1 send spot and 1 recv posted */
@@ -1270,6 +1271,9 @@ static struct iscsi_task *iscsi_iser_all
 	itask = zalloc(sizeof(*itask) + ext_len);
 	if (!itask)
 		return NULL;
+	if (ci->task_flag != 1)
+		printf("scsi_iser_alloc_task flag not set!\n");
+	ci->task_flag = 0;
 
 	itask->rem_read_stag = ci->rem_read_stag;
 	itask->rem_read_va = ci->rem_read_va;
@@ -1292,6 +1296,15 @@ static int iser_parse_hdr(struct conn_in
 	switch (hdr->flags & 0xF0) {
 	case ISCSI_CTRL:
 		dprintf("control type PDU\n");
+		ci->rem_read_stag  = 0;
+		ci->rem_write_stag = 0;
+		ci->rem_read_va    = 0;
+		ci->rem_write_va   = 0;
+
+		if (ci->task_flag != 0)
+			printf("iser_parse_hdr flag not zero!\n");
+		ci->task_flag = 1;
+
 		if (hdr->flags & ISER_RSV) {
 			ci->rem_read_stag = be32_to_cpu(hdr->read_stag);
 			ci->rem_read_va = be64_to_cpu(hdr->read_va);
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list