summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/iscsid.conf9
-rw-r--r--usr/config.h1
-rw-r--r--usr/idbm.c3
-rw-r--r--usr/idbm_fields.h1
-rw-r--r--usr/initiator.c8
-rw-r--r--usr/initiator.h1
-rw-r--r--usr/iscsi_settings.h1
-rw-r--r--usr/util.c1
8 files changed, 23 insertions, 2 deletions
diff --git a/etc/iscsid.conf b/etc/iscsid.conf
index a2c83f7..e8b62f0 100644
--- a/etc/iscsid.conf
+++ b/etc/iscsid.conf
@@ -121,7 +121,14 @@ node.session.err_timeo.abort_timeout = 15
# before failing the operation and trying session re-establishment
# edit the line.
# The value is in seconds and the default is 30 seconds.
-node.session.err_timeo.lu_reset_timeout = 20
+node.session.err_timeo.lu_reset_timeout = 30
+
+# To specify the time to wait for a target response
+# before failing the operation and trying session re-establishment
+# edit the line.
+# The value is in seconds and the default is 30 seconds.
+node.session.err_timeo.tgt_reset_timeout = 30
+
#******
# Retry
diff --git a/usr/config.h b/usr/config.h
index 354cd30..47b8d9b 100644
--- a/usr/config.h
+++ b/usr/config.h
@@ -86,6 +86,7 @@ struct iscsi_error_timeout_config {
int abort_timeout;
int host_reset_timeout;
int lu_reset_timeout;
+ int tgt_reset_timeout;
};
/* all TCP options go in this structure.
diff --git a/usr/idbm.c b/usr/idbm.c
index 5d1611e..c6cd7fd 100644
--- a/usr/idbm.c
+++ b/usr/idbm.c
@@ -263,6 +263,9 @@ idbm_recinfo_node(node_rec_t *r, recinfo_t *ri)
__recinfo_int(SESSION_LU_RESET_TMO, ri, r,
session.err_timeo.lu_reset_timeout,
IDBM_SHOW, num, 1);
+ __recinfo_int(SESSION_TGT_RESET_TMO, ri, r,
+ session.err_timeo.tgt_reset_timeout,
+ IDBM_SHOW, num, 1);
__recinfo_int(SESSION_HOST_RESET_TMO, ri, r,
session.err_timeo.host_reset_timeout,
IDBM_SHOW, num, 1);
diff --git a/usr/idbm_fields.h b/usr/idbm_fields.h
index aae36f7..ead8a65 100644
--- a/usr/idbm_fields.h
+++ b/usr/idbm_fields.h
@@ -31,6 +31,7 @@
#define SESSION_REPLACEMENT_TMO "node.session.timeo.replacement_timeout"
#define SESSION_ABORT_TMO "node.session.err_timeo.abort_timeout"
#define SESSION_LU_RESET_TMO "node.session.err_timeo.lu_reset_timeout"
+#define SESSION_TGT_RESET_TMO "node.session.err_timeo.tgt_reset_timeout"
#define SESSION_HOST_RESET_TMO "node.session.err_timeo.host_reset_timeout"
#define SESSION_FAST_ABORT "node.session.iscsi.FastAbort"
#define SESSION_INITIAL_R2T "node.session.iscsi.InitialR2T"
diff --git a/usr/initiator.c b/usr/initiator.c
index 13c7e65..3261f98 100644
--- a/usr/initiator.c
+++ b/usr/initiator.c
@@ -546,6 +546,7 @@ __session_create(node_rec_t *rec, struct iscsi_transport *t)
session->fast_abort = rec->session.iscsi.FastAbort;
session->abort_timeout = rec->session.err_timeo.abort_timeout;
session->lu_reset_timeout = rec->session.err_timeo.lu_reset_timeout;
+ session->tgt_reset_timeout = rec->session.err_timeo.tgt_reset_timeout;
session->host_reset_timeout = rec->session.err_timeo.host_reset_timeout;
/* OUI and uniqifying number */
@@ -1186,7 +1187,7 @@ mgmt_ipc_err_e iscsi_host_set_param(int host_no, int param, char *value)
return MGMT_IPC_OK;
}
-#define MAX_SESSION_PARAMS 31
+#define MAX_SESSION_PARAMS 32
#define MAX_HOST_PARAMS 3
static void
@@ -1361,6 +1362,11 @@ setup_full_feature_phase(iscsi_conn_t *conn)
.type = ISCSI_INT,
.conn_only = 0,
}, {
+ .param = ISCSI_PARAM_TGT_RESET_TMO,
+ .value = &session->tgt_reset_timeout,
+ .type = ISCSI_INT,
+ .conn_only = 0,
+ }, {
.param = ISCSI_PARAM_PING_TMO,
.value = &conn->noop_out_timeout,
.type = ISCSI_INT,
diff --git a/usr/initiator.h b/usr/initiator.h
index 5bcf4d1..7f030bb 100644
--- a/usr/initiator.h
+++ b/usr/initiator.h
@@ -252,6 +252,7 @@ typedef struct iscsi_session {
uint32_t replacement_timeout;
int host_reset_timeout;
+ int tgt_reset_timeout;
int lu_reset_timeout;
int abort_timeout;
diff --git a/usr/iscsi_settings.h b/usr/iscsi_settings.h
index 32d0e85..3d923c8 100644
--- a/usr/iscsi_settings.h
+++ b/usr/iscsi_settings.h
@@ -11,6 +11,7 @@
#define DEF_ABORT_TIMEO 15
#define DEF_LU_RESET_TIMEO 30
+#define DEF_TGT_RESET_TIMEO 30
#define DEF_HOST_RESET_TIMEO 60
/* q depths */
diff --git a/usr/util.c b/usr/util.c
index 6234fd5..e72ed15 100644
--- a/usr/util.c
+++ b/usr/util.c
@@ -361,6 +361,7 @@ void idbm_node_setup_defaults(node_rec_t *rec)
rec->session.auth.password_in_length = 0;
rec->session.err_timeo.abort_timeout = DEF_ABORT_TIMEO;
rec->session.err_timeo.lu_reset_timeout = DEF_LU_RESET_TIMEO;
+ rec->session.err_timeo.tgt_reset_timeout = DEF_TGT_RESET_TIMEO;
rec->session.err_timeo.host_reset_timeout = DEF_HOST_RESET_TIMEO;
rec->session.timeo.replacement_timeout = DEF_REPLACEMENT_TIMEO;
rec->session.iscsi.InitialR2T = 0;