• Christoph Hellwig's avatar
    target: stop task timers earlier · cc5d0f0f
    Christoph Hellwig authored
    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: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    cc5d0f0f
target_core_base.h 26.2 KB