]> git.baikalelectronics.ru Git - kernel.git/commit
target: stop task timers earlier
authorChristoph Hellwig <hch@infradead.org>
Mon, 17 Oct 2011 17:56:48 +0000 (13:56 -0400)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 24 Oct 2011 03:21:44 +0000 (03:21 +0000)
commitd1a59a14a961a78d59359a7c2f8e89e4a49f4e32
tree4e6857339fed505ed1b373941126ff1e1e37a0ba
parent81e2003791f5ef662e9155e953f47e9f16bc8159
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>
drivers/target/target_core_transport.c
include/target/target_core_base.h
include/target/target_core_transport.h