diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-10-17 13:56:48 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-10-23 23:21:44 -0400 |
commit | cc5d0f0f61645ca43d9a7320ec2f268bad5016c5 (patch) | |
tree | 4e6857339fed505ed1b373941126ff1e1e37a0ba /include/target | |
parent | e99d48a62bfc6e64548e0d5085240c5024eca471 (diff) |
target: stop task timers earlier
Currently we stop the timers for all tasks in a command fairly late during
I/O completion, which is fairly pointless and requires all kinds of safety
checks.
Instead delete pending timers early on in transport_complete_task, thus
ensuring no new timers firest after that. We take t_state_lock a bit later
in that function thus making sure currenly running timers are out of the
criticial section. To be completely sure the timer has finished we also
add another del_timer_sync call when freeing the task.
This also allows removing TF_TIMER_RUNNING as it would be equivalent
to TF_ACTIVE now.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_base.h | 1 | ||||
-rw-r--r-- | include/target/target_core_transport.h | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 8f02a65de75f..027193650749 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -77,7 +77,6 @@ enum se_task_flags { | |||
77 | TF_SENT = (1 << 1), | 77 | TF_SENT = (1 << 1), |
78 | TF_TIMEOUT = (1 << 2), | 78 | TF_TIMEOUT = (1 << 2), |
79 | TF_REQUEST_STOP = (1 << 3), | 79 | TF_REQUEST_STOP = (1 << 3), |
80 | TF_TIMER_RUNNING = (1 << 4), | ||
81 | }; | 80 | }; |
82 | 81 | ||
83 | /* Special transport agnostic struct se_cmd->t_states */ | 82 | /* Special transport agnostic struct se_cmd->t_states */ |
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index 1ba5835426fc..c8538c5d3fbf 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
@@ -172,7 +172,6 @@ extern void transport_new_cmd_failure(struct se_cmd *); | |||
172 | extern int transport_generic_handle_tmr(struct se_cmd *); | 172 | extern int transport_generic_handle_tmr(struct se_cmd *); |
173 | extern void transport_generic_free_cmd_intr(struct se_cmd *); | 173 | extern void transport_generic_free_cmd_intr(struct se_cmd *); |
174 | extern bool target_stop_task(struct se_task *task, unsigned long *flags); | 174 | extern bool target_stop_task(struct se_task *task, unsigned long *flags); |
175 | extern void __transport_stop_task_timer(struct se_task *, unsigned long *); | ||
176 | extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, | 175 | extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, |
177 | struct scatterlist *, u32); | 176 | struct scatterlist *, u32); |
178 | extern int transport_clear_lun_from_sessions(struct se_lun *); | 177 | extern int transport_clear_lun_from_sessions(struct se_lun *); |