Mike Christie wrote:
> On 07/31/2009 07:43 AM, Erez Zilber wrote:
>> I thought that this patch just reduces the timeout from 15 to 3. Does
>> it also fix the 3 sndtmo periods or is it another patch? What was the
>
> Another patch. You should have it.
>
>> bug that caused the 3 sndtmo periods waiting?
>>
>
> I think I meant two.
>
> If iscsi_tcp_xmit_segment sent some data, then got EAGIN, it would drop
> the EAGIN. iscsi_xmit would then retry the operation so we would wait again.
>
There is one more bug.
Could you try the 15->3 sec snd tmp patch plus the attached patch?
Another problem is that if we had multiple tasks on the cmd or requeue
lists, and iscsi_tcp returns a error, the write_space function can still
run and queue iscsi_data_xmit. If it was a legetimate problem and
iscsi_conn_failure was run but we raced and iscsi_data_xmit was run
first it could miss the suspend bit checks, and start trying to send
data again and hit another timeout.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"open-iscsi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index d00257e..2341152 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -245,6 +245,10 @@ static int iscsi_sw_tcp_xmit_segment(struct iscsi_tcp_conn *tcp_conn,
unsigned int offset, copy;
int flags = 0;
+ if (test_bit(ISCSI_SUSPEND_BIT,
+ &tcp_conn->iscsi_conn->suspend_tx))
+ return -ENODATA;
+
r = 0;
offset = segment->copied;
copy = segment->size - offset;
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 1d7a8b7..e1e9bfa 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1329,7 +1329,8 @@ static int iscsi_data_xmit(struct iscsi_conn *conn)
int rc = 0;
spin_lock_bh(&conn->session->lock);
- if (unlikely(conn->suspend_tx)) {
+
+ if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx)) {
ISCSI_DBG_SESSION(conn->session, "Tx suspended!\n");
spin_unlock_bh(&conn->session->lock);
return -ENODATA;
@@ -1420,7 +1421,7 @@ check_mgmt:
return -ENODATA;
again:
- if (unlikely(conn->suspend_tx))
+ if (test_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx))
rc = -ENODATA;
spin_unlock_bh(&conn->session->lock);
return rc;