From 10840a381f8f60cddbeeea26223bf375c3cdec47 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Sat, 9 Nov 2013 03:02:59 +0000 Subject: [PATCH] A problem we are hitting is that we could hit a network issue when a command/data is in the process of being sent. The snd buffer space goes to zero and sendpage returns -EAGAIN. We then wait for space to open. If space never opens then the cmd rsp timer fires and the session/connection is dropped. During that time we could try to send a nop as a ping, but it is stuck behind that other command that got EAGAIN and we are waiting for space to open to send them. We would expect the nop in timer to fire before the cmd rsp timer, but it cannot becuase the nop is sitting in the internal iscsi-scst queue. This patch just has us start the timer ont he nop in right away. Signed-off-by: Mike Christie git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5091 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/iscsi.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iscsi-scst/kernel/iscsi.c b/iscsi-scst/kernel/iscsi.c index 3c57704ac..b85a215db 100644 --- a/iscsi-scst/kernel/iscsi.c +++ b/iscsi-scst/kernel/iscsi.c @@ -3818,6 +3818,14 @@ void iscsi_send_nop_in(struct iscsi_conn *conn) list_add_tail(&rsp->nop_req_list_entry, &conn->nop_req_list); spin_unlock_bh(&conn->nop_req_list_lock); + /* + * Start NopRsp timer now to catch case where send buffer is full due + * to connection being down, so this is never even sent to tcp layer. + * This prevent us from having to wait for the CmdRsp timer which + * is normally much longer. + */ + req_add_to_write_timeout_list(req); + out_err_free_req: req_cmnd_release(req);