Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/iscsi Return temporary errors when the session is tr...



details:   https://anonhg.NetBSD.org/src/rev/1ef95e44d12e
branches:  trunk
changeset: 320888:1ef95e44d12e
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Sun Mar 04 07:39:45 2018 +0000

description:
Return temporary errors when the session is trying to recover the last
connection. The scsipi layer will retry.

diffstat:

 sys/dev/iscsi/iscsi_send.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 79ca32e962fd -r 1ef95e44d12e sys/dev/iscsi/iscsi_send.c
--- a/sys/dev/iscsi/iscsi_send.c        Sun Mar 04 07:37:43 2018 +0000
+++ b/sys/dev/iscsi/iscsi_send.c        Sun Mar 04 07:39:45 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iscsi_send.c,v 1.36 2017/12/03 19:07:10 christos Exp $ */
+/*     $NetBSD: iscsi_send.c,v 1.37 2018/03/04 07:39:45 mlelstv Exp $  */
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -1485,7 +1485,10 @@
        conn = assign_connection(session, waitok);
 
        if (conn == NULL || conn->c_terminating || conn->c_state != ST_FULL_FEATURE) {
-               xs->error = XS_SELTIMEOUT;
+               if (session->s_terminating)
+                       xs->error = XS_SELTIMEOUT;
+               else
+                       xs->error = XS_BUSY;
                DEBC(conn, 10, ("run_xfer on dead connection\n"));
                scsipi_done(xs);
                unref_session(session);



Home | Main Index | Thread Index | Old Index