During heavy I/O we might hit a receive timeout as the
xmitworker is still busy sending PDUs. Even as we strictly
speaking didn't receive a reply during the receive timeout,
we didn't actually gave the target a chance to reply as
we're constantly hitting it with requests.
So it's better to ensure that cmdqueue really is empty
before start sending NOPs.

Signed-off-by: Hannes Reinecke <h...@suse.de>
 drivers/scsi/libiscsi.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 716cc34..41bb177 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1862,7 +1862,9 @@ static void iscsi_check_transport_timeouts(unsigned long 
-       if (time_before_eq(last_recv + recv_timeout, jiffies)) {
+       if (time_before_eq(last_recv + recv_timeout, jiffies) &&
+           list_empty(&conn->cmdqueue) &&
+           list_empty(&conn->requeue)) {
                /* send a ping to try to provoke some traffic */
                ISCSI_DBG_CONN(conn, "Sending nopout as ping\n");
                iscsi_send_nopout(conn, NULL);

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 
For more options, visit this group at http://groups.google.com/group/open-iscsi

Reply via email to