On 03/01/2010 12:06 PM, bet wrote:
1.  Based on my timeouts I would think that my session would time out

Yes. It should timeout about 15 secs after you see
> Mar  1 07:14:27 bentCluster-1 kernel:  connection4:0: ping timeout of
> 5 secs expired, recv timeout 5, last rx 4884304, last ping 4889304,
> now 4894304

You might be hitting a bug where the network layer gets stuck trying to send data. I attached a patch that should fix the problem.

If you do not know how to build a RHEL kernel let me know the arch you are using and I can build a kernel here (it takes about a day).



after 15 seconds.  Anyone have an idea why is it taking 67 seconds?
Am I missing any other timeout values?

No. The ones you have set are it.


2.  In a perfect world what is the best case scenario for the failure
of my iSCSI session?


It should work like in that doc.

--
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c
index 5c39369..e840806 100644
--- a/drivers/scsi/iscsi_tcp.c
+++ b/drivers/scsi/iscsi_tcp.c
@@ -276,11 +276,12 @@ static int iscsi_sw_tcp_xmit(struct iscsi_conn *conn)
 
        while (1) {
                rc = iscsi_sw_tcp_xmit_segment(tcp_conn, segment);
-               if (rc < 0) {
+               if (rc == -EAGAIN)
+                       return rc;
+               else if (rc < 0) {
                        rc = ISCSI_ERR_XMIT_FAILED;
                        goto error;
-               }
-               if (rc == 0)
+               } else if (rc == 0)
                        break;
 
                consumed += rc;
@@ -561,9 +562,10 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn 
*cls_conn, int flag)
        struct iscsi_conn *conn = cls_conn->dd_data;
        struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
        struct iscsi_sw_tcp_conn *tcp_sw_conn = tcp_conn->dd_data;
+       struct socket *sock = tcp_sw_conn->sock;
 
        /* userspace may have goofed up and not bound us */
-       if (!tcp_sw_conn->sock)
+       if (!sock)
                return;
        /*
         * Make sure our recv side is stopped.
@@ -574,6 +576,11 @@ static void iscsi_sw_tcp_conn_stop(struct iscsi_cls_conn 
*cls_conn, int flag)
        set_bit(ISCSI_SUSPEND_BIT, &conn->suspend_rx);
        write_unlock_bh(&tcp_sw_conn->sock->sk->sk_callback_lock);
 
+       if (sock->sk->sk_sleep && waitqueue_active(sock->sk->sk_sleep)) {
+               sock->sk->sk_err = EIO;
+               wake_up_interruptible(sock->sk->sk_sleep);
+       }
+
        iscsi2_conn_stop(cls_conn, flag);
        iscsi_sw_tcp_release_conn(conn);
 }

Reply via email to