We were setting the next timeout check to be the current time plus

the timeout value. The problem is that if commands were started at
00:00:05 and 00:00:10 and the timeout value was 15 seconds and the
first command completed ok, then conn_rsp_timer_fn would have run
at 00:00:20 and rescheduled the next conn_rsp_timer_fn run for 15
secs from that time (00:00:35). But, we would have wanted to check on
the second command at 15 secs after its write_start time which is
00:00:25.

This patch has us reschedule the next conn_rsp_timer_fn run for
the req's write_start time + its timeout.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5093 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2013-11-09 03:19:33 +00:00
parent 1f4f117f3f
commit 13ee8e1649
+1 -1
View File
@@ -520,7 +520,7 @@ static void conn_rsp_timer_fn(unsigned long arg)
cmnd = list_first_entry(&conn->write_timeout_list,
struct iscsi_cmnd, write_timeout_list_entry);
timeout_time = j + iscsi_get_timeout(cmnd) + ISCSI_ADD_SCHED_TIME;
timeout_time = iscsi_get_timeout_time(cmnd) + ISCSI_ADD_SCHED_TIME;
if (unlikely(time_after_eq(j, iscsi_get_timeout_time(cmnd)))) {
if (!conn->closing) {