Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156502550
D34230.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D34230.diff
View Options
Index: sys/dev/iscsi/iscsi.c
===================================================================
--- sys/dev/iscsi/iscsi.c
+++ sys/dev/iscsi/iscsi.c
@@ -579,7 +579,7 @@
return;
}
- sbt = mstosbt(995);
+ sbt = mstosbt(((is->is_ping_timeout * 1000) / 3) - 5);
pr = mstosbt(10);
callout_schedule_sbt(&is->is_callout, sbt, pr, 0);
@@ -589,19 +589,19 @@
is->is_timeout++;
if (is->is_waiting_for_iscsid) {
- if (iscsid_timeout > 0 && is->is_timeout > iscsid_timeout) {
+ if (iscsid_timeout > 0) {
ISCSI_SESSION_WARN(is, "timed out waiting for iscsid(8) "
"for %d seconds; reconnecting",
- is->is_timeout);
+ iscsid_timeout);
reconnect_needed = true;
}
goto out;
}
if (is->is_login_phase) {
- if (is->is_login_timeout > 0 && is->is_timeout > is->is_login_timeout) {
+ if (is->is_login_timeout > 0) {
ISCSI_SESSION_WARN(is, "login timed out after %d seconds; "
- "reconnecting", is->is_timeout);
+ "reconnecting", is->is_login_timeout);
reconnect_needed = true;
}
goto out;
@@ -617,7 +617,7 @@
goto out;
}
- if (is->is_timeout >= is->is_ping_timeout) {
+ if (is->is_timeout >= 3) {
ISCSI_SESSION_WARN(is, "no ping reply (NOP-In) after %d seconds; "
"reconnecting", is->is_ping_timeout);
reconnect_needed = true;
@@ -1393,6 +1393,7 @@
struct iscsi_session *is;
struct icl_drv_limits idl;
int error;
+ sbintime_t sbt, pr;
sx_slock(&sc->sc_lock);
for (;;) {
@@ -1427,6 +1428,12 @@
is->is_waiting_for_iscsid = false;
is->is_login_phase = true;
+ is->is_timeout = 0;
+ sbt = mstosbt(995);
+ pr = mstosbt(10);
+ if (login_timeout > 0)
+ sbt = mstosbt(login_timeout * 1000 - 5);
+ callout_schedule_sbt(&is->is_callout, sbt, pr, 0);
is->is_reason[0] = '\0';
ISCSI_SESSION_UNLOCK(is);
@@ -1467,6 +1474,7 @@
struct iscsi_session *is;
struct icl_conn *ic;
int error;
+ sbintime_t sbt, pr;
sx_slock(&sc->sc_lock);
@@ -1539,6 +1547,11 @@
if (is->is_login_timeout < 0)
is->is_login_timeout = login_timeout;
is->is_connected = true;
+ sbt = mstosbt(995);
+ pr = mstosbt(10);
+ if (is->is_ping_timeout > 0)
+ sbt = mstosbt(((is->is_ping_timeout * 1000) / 3) - 5);
+ callout_schedule_sbt(&is->is_callout, sbt, pr, 0);
is->is_reason[0] = '\0';
ISCSI_SESSION_UNLOCK(is);
@@ -1648,6 +1661,7 @@
struct iscsi_session *is;
struct sockaddr *from_sa, *to_sa;
int error;
+ sbintime_t sbt, pr;
sx_slock(&sc->sc_lock);
TAILQ_FOREACH(is, &sc->sc_sessions, is_next) {
@@ -1686,6 +1700,11 @@
is->is_waiting_for_iscsid = false;
is->is_login_phase = true;
is->is_timeout = 0;
+ sbt = mstosbt(995);
+ pr = mstosbt(10);
+ if (is->is_login_timeout > 0)
+ sbt = mstosbt(is->is_login_timeout * 1000 - 5);
+ callout_schedule_sbt(&is->is_callout, sbt, pr, 0);
ISCSI_SESSION_UNLOCK(is);
error = icl_conn_connect(is->is_conn, idc->idc_domain,
@@ -1953,6 +1972,9 @@
sbt = mstosbt(995);
pr = mstosbt(10);
+ if (iscsid_timeout > 0) {
+ sbt = mstosbt(iscsid_timeout * 1000 - 5);
+ }
callout_reset_sbt(&is->is_callout, sbt, pr, iscsi_callout, is, 0);
TAILQ_INSERT_TAIL(&sc->sc_sessions, is, is_next);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 15, 4:48 AM (8 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33073360
Default Alt Text
D34230.diff (3 KB)
Attached To
Mode
D34230: iscsi: send only 3 iscsi_pings in the timeout interval
Attached
Detach File
Event Timeline
Log In to Comment