All of lore.kernel.org
 help / color / mirror / Atom feed
From: michaelc@cs.wisc.edu
To: linux-scsi@vger.kernel.org
Cc: Mike Christie <michaelc@cs.wisc.edu>
Subject: [PATCH 19/24] libiscsi, iscsi class: set tmf to a safe default and export in sysfs
Date: Thu, 13 Dec 2007 12:43:38 -0600	[thread overview]
Message-ID: <11975714503562-git-send-email-michaelc@cs.wisc.edu> (raw)
In-Reply-To: <1197571448857-git-send-email-michaelc@cs.wisc.edu>

From: Mike Christie <michaelc@cs.wisc.edu>

Older tools will not be setting the tmf time outs since they
did not exists, so set them to a safe default.

And export abort and lu reset timeout values in sysfs.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
---
 drivers/scsi/libiscsi.c             |    2 ++
 drivers/scsi/scsi_transport_iscsi.c |    8 ++++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index f15df8d..6573223 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1732,6 +1732,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
 	session->host = shost;
 	session->state = ISCSI_STATE_FREE;
 	session->fast_abort = 1;
+	session->lu_reset_timeout = 15;
+	session->abort_timeout = 10;
 	session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX;
 	session->cmds_max = cmds_max;
 	session->queued_cmdsn = session->cmdsn = initial_cmdsn;
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index 36aa50e..3585599 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -30,7 +30,7 @@
 #include <scsi/scsi_transport_iscsi.h>
 #include <scsi/iscsi_if.h>
 
-#define ISCSI_SESSION_ATTRS 16
+#define ISCSI_SESSION_ATTRS 18
 #define ISCSI_CONN_ATTRS 11
 #define ISCSI_HOST_ATTRS 4
 #define ISCSI_TRANSPORT_VERSION "2.0-724"
@@ -1242,7 +1242,9 @@ iscsi_session_attr(username, ISCSI_PARAM_USERNAME, 1);
 iscsi_session_attr(username_in, ISCSI_PARAM_USERNAME_IN, 1);
 iscsi_session_attr(password, ISCSI_PARAM_PASSWORD, 1);
 iscsi_session_attr(password_in, ISCSI_PARAM_PASSWORD_IN, 1);
-iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 1);
+iscsi_session_attr(fast_abort, ISCSI_PARAM_FAST_ABORT, 0);
+iscsi_session_attr(abort_tmo, ISCSI_PARAM_ABORT_TMO, 0);
+iscsi_session_attr(lu_reset_tmo, ISCSI_PARAM_LU_RESET_TMO, 0);
 
 #define iscsi_priv_session_attr_show(field, format)			\
 static ssize_t								\
@@ -1467,6 +1469,8 @@ iscsi_register_transport(struct iscsi_transport *tt)
 	SETUP_SESSION_RD_ATTR(username, ISCSI_PASSWORD);
 	SETUP_SESSION_RD_ATTR(username_in, ISCSI_PASSWORD_IN);
 	SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT);
+	SETUP_SESSION_RD_ATTR(abort_tmo, ISCSI_ABORT_TMO);
+	SETUP_SESSION_RD_ATTR(lu_reset_tmo,ISCSI_LU_RESET_TMO);
 	SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo);
 
 	BUG_ON(count > ISCSI_SESSION_ATTRS);
-- 
1.5.1.2


  reply	other threads:[~2007-12-13 18:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13 18:43 RESEND: iscsi update for 2.6.25 michaelc
2007-12-13 18:43 ` [PATCH 01/24] libiscsi, iscsi_tcp: add device support michaelc
2007-12-13 18:43   ` [PATCH 02/24] iscsi_tcp: rewrite recv path michaelc
2007-12-13 18:43     ` [PATCH 03/24] Prettify resid handling and some extra checks michaelc
2007-12-13 18:43       ` [PATCH 04/24] iscsi_tcp, libiscsi: initial AHS Support michaelc
2007-12-13 18:43         ` [PATCH 05/24] iser patching for AHS support michaelc
2007-12-13 18:43           ` [PATCH 06/24] libiscsi, iscsi_tcp: iscsi pool cleanup michaelc
2007-12-13 18:43             ` [PATCH 07/24] libiscsi: do not block session during logout michaelc
2007-12-13 18:43               ` [PATCH 08/24] iscsi class: Use our own workq instead of common system one michaelc
2007-12-13 18:43                 ` [PATCH 09/24] libiscsi: grab eh_mutex during host reset michaelc
2007-12-13 18:43                   ` [PATCH 10/24] libiscsi: fix shutdown michaelc
2007-12-13 18:43                     ` [PATCH 11/24] libiscsi: fix nop handling michaelc
2007-12-13 18:43                       ` [PATCH 12/24] iscsi_tcp: update the website URL michaelc
2007-12-13 18:43                         ` [PATCH 13/24] Do not fail commands immediately during logout michaelc
2007-12-13 18:43                           ` [PATCH 14/24] clear conn->ctask when task is completed early michaelc
2007-12-13 18:43                             ` [PATCH 15/24] Drop host lock in queuecommand michaelc
2007-12-13 18:43                               ` [PATCH 16/24] convert xmit path to iscsi chunks michaelc
2007-12-13 18:43                                 ` [PATCH 17/24] iscsi_tcp: stop leaking r2t_info's when the incoming R2T is bad michaelc
2007-12-13 18:43                                   ` [PATCH 18/24] iscsi_tcp: drop session when itt does not match any command michaelc
2007-12-13 18:43                                     ` michaelc [this message]
2007-12-13 18:43                                       ` [PATCH 20/24] iscsi_tcp: enable sg chaining michaelc
2007-12-13 18:43                                         ` [PATCH 21/24] iscsi_tcp: hold lock during data rsp processing michaelc
2007-12-13 18:43                                           ` [PATCH 22/24] libiscsi: use is_power_of_2 michaelc
2007-12-13 18:43                                             ` [PATCH 23/24] iscsi_tcp: fix setting of r2t michaelc
2007-12-13 18:43                                               ` [PATCH 24/24] iscsi class: bump version michaelc
2007-12-16 10:09                                         ` [PATCH 20/24] iscsi_tcp: enable sg chaining Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=11975714503562-git-send-email-michaelc@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.