Klemens Kittan wrote:
> Am Tuesday, 19. August 2008 19:15 schrieb Mike Christie:
>> Klemens Kittan wrote:
>>> Am Monday, 18. August 2008 20:10 schrieb Mike Christie:
>>>> Klemens Kittan wrote:
>>>>> Am Friday, 15. August 2008 20:03 schrieb Mike Christie:
>>>>>> Mike Christie wrote:
>>>>>>> Klemens Kittan wrote:
>>>>>>>> Here is the configuration of my debian kernel (2.6.25-2).
>>>>>>> Thanks. It looks like your target is responding to other IO, but did
>>>>>>> not respond to the ping quick enough so it timed out. Let me make a
>>>>>>> patch for you to test. I should hopefully have it later today.
>>>>>> Try the attached patch over  open-iscsi-2.0-869.2 tarball modules.
>>>>>>
>>>>>> To apply the patch untar and unzip the source then cd to the dir. Then
>>>>>> do:
>>>>>>
>>>>>> patch -p1 -i where-the-patch-is-saved/relax-ping-timer.patch
>>>>>>
>>>>>> Then do the normal make and make install. You will probably want to
>>>>>> reboot the box to make sure you are using the new modules.
>>>>> Unfortunately I got the same errors.
>>>> Could you send the log output?
>>> Here is the /var/log/syslog.
>> Shoot. For some reason that nop is just not finishing in a decent amount
>> of time. Could you try the attached patch. It gives the nop even more
>> time to complete and it spits out a bunch of debug info to make sure
>> open-iscsi did not leak the task.
>>
> 
> Unfortunately, the attached file is empty.
> 

Sorry here it is.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

--- open-iscsi-2.0-869.2/kernel/libiscsi.c      2008-05-08 19:53:48.000000000 
-0500
+++ open-iscsi-2.0-869.2.nop/kernel/libiscsi.c  2008-08-19 12:13:38.000000000 
-0500
@@ -319,8 +319,10 @@ void iscsi_free_mgmt_task(struct iscsi_c
        if (conn->login_mtask == mtask)
                return;
 
-       if (conn->ping_mtask == mtask)
+       if (conn->ping_mtask == mtask) {
+               printk(KERN_ERR "iscsi_free_mgmt_task %p\n", mtask);
                conn->ping_mtask = NULL;
+       }
        __kfifo_put(conn->session->mgmtpool.queue,
                    (void*)&mtask, sizeof(void*));
 }
@@ -501,6 +503,7 @@ static void iscsi_send_nopout(struct isc
 
        /* only track our nops */
        if (!rhdr) {
+               printk(KERN_ERR "send %p\n", mtask);
                conn->ping_mtask = mtask;
                conn->last_ping = jiffies;
        }
@@ -628,6 +631,7 @@ static int __iscsi_complete_pdu(struct i
                        conn->exp_statsn = be32_to_cpu(hdr->statsn) + 1;
 
                        if (conn->ping_mtask != mtask) {
+                               printk(KERN_ERR "userspace nop\n");
                                /*
                                 * If this is not in response to one of our
                                 * nops then it must be from userspace.
@@ -1367,19 +1371,28 @@ static void iscsi_check_transport_timeou
 
        recv_timeout *= HZ;
        last_recv = conn->last_recv;
+       /*
+        * Don't fire the eh if the ping timed out but we are getting
+        * other IO responses. Just give it more time.
+        */
        if (conn->ping_mtask &&
            time_before_eq(conn->last_ping + (conn->ping_timeout * HZ),
-                          jiffies)) {
+                          jiffies) &&
+           time_before_eq(last_recv + (recv_timeout * 2), jiffies)) {
                iscsi_conn_printk(KERN_ERR, conn, "ping timeout of %d secs "
-                                 "expired, last rx %lu, last ping %lu, "
-                                 "now %lu\n", conn->ping_timeout, last_recv,
-                                 conn->last_ping, jiffies);
+                                 "with recv timeout of %d secs expired "
+                                 "last rx %lu, last ping %lu, now %lu "
+                                 "task %p\n",
+                                 conn->ping_timeout, conn->recv_timeout,
+                                 last_recv, conn->last_ping, jiffies,
+                                 conn->ping_mtask);
                spin_unlock(&session->lock);
                iscsi_conn_failure(conn, ISCSI_ERR_CONN_FAILED);
                return;
        }
 
-       if (time_before_eq(last_recv + recv_timeout, jiffies)) {
+       if (!conn->ping_mtask &&
+           time_before_eq(last_recv + recv_timeout, jiffies)) {
                /* send a ping to try to provoke some traffic */
                debug_scsi("Sending nopout as ping on conn %p\n", conn);
                iscsi_send_nopout(conn, NULL);

Reply via email to