Commit 4cd49ea1 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley

[SCSI] libiscsi, iscsi class: set tmf to a safe default and export in sysfs

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: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 7a53dc52
...@@ -1732,6 +1732,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit, ...@@ -1732,6 +1732,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
session->host = shost; session->host = shost;
session->state = ISCSI_STATE_FREE; session->state = ISCSI_STATE_FREE;
session->fast_abort = 1; session->fast_abort = 1;
session->lu_reset_timeout = 15;
session->abort_timeout = 10;
session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX; session->mgmtpool_max = ISCSI_MGMT_CMDS_MAX;
session->cmds_max = cmds_max; session->cmds_max = cmds_max;
session->queued_cmdsn = session->cmdsn = initial_cmdsn; session->queued_cmdsn = session->cmdsn = initial_cmdsn;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include <scsi/scsi_transport_iscsi.h> #include <scsi/scsi_transport_iscsi.h>
#include <scsi/iscsi_if.h> #include <scsi/iscsi_if.h>
#define ISCSI_SESSION_ATTRS 16 #define ISCSI_SESSION_ATTRS 18
#define ISCSI_CONN_ATTRS 11 #define ISCSI_CONN_ATTRS 11
#define ISCSI_HOST_ATTRS 4 #define ISCSI_HOST_ATTRS 4
#define ISCSI_TRANSPORT_VERSION "2.0-724" #define ISCSI_TRANSPORT_VERSION "2.0-724"
...@@ -1242,7 +1242,9 @@ iscsi_session_attr(username, ISCSI_PARAM_USERNAME, 1); ...@@ -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(username_in, ISCSI_PARAM_USERNAME_IN, 1);
iscsi_session_attr(password, ISCSI_PARAM_PASSWORD, 1); iscsi_session_attr(password, ISCSI_PARAM_PASSWORD, 1);
iscsi_session_attr(password_in, ISCSI_PARAM_PASSWORD_IN, 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) \ #define iscsi_priv_session_attr_show(field, format) \
static ssize_t \ static ssize_t \
...@@ -1467,6 +1469,8 @@ iscsi_register_transport(struct iscsi_transport *tt) ...@@ -1467,6 +1469,8 @@ iscsi_register_transport(struct iscsi_transport *tt)
SETUP_SESSION_RD_ATTR(username, ISCSI_PASSWORD); SETUP_SESSION_RD_ATTR(username, ISCSI_PASSWORD);
SETUP_SESSION_RD_ATTR(username_in, ISCSI_PASSWORD_IN); SETUP_SESSION_RD_ATTR(username_in, ISCSI_PASSWORD_IN);
SETUP_SESSION_RD_ATTR(fast_abort, ISCSI_FAST_ABORT); 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); SETUP_PRIV_SESSION_RD_ATTR(recovery_tmo);
BUG_ON(count > ISCSI_SESSION_ATTRS); BUG_ON(count > ISCSI_SESSION_ATTRS);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment