target: Re-org of core_tmr_lun_reset
commitd050ffb922c782f092234611b9019e95024481ab
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 29 Sep 2011 04:37:29 +0000 (28 21:37 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 24 Oct 2011 03:19:32 +0000 (24 03:19 +0000)
treea2883666772d23546cda814ff9894ff05edbe005
parent79a7fef26431830e22e282053d050af790117db8
target: Re-org of core_tmr_lun_reset

This patch is a re-orginzation of core_tmr_lun_reset() logic to properly
scan the active tmr_list, dev->state_task_list and qobj->qobj_list w/ the
relivent locks held, and performing a list_move_tail onto seperate local
scope lists before performing the full drain.

This involves breaking out the code into three seperate list specific
functions: core_tmr_drain_tmr_list(), core_tmr_drain_task_list() and
core_tmr_drain_cmd_list().

(nab: Include target: Remove non-active tasks from execute list during
      LUN_RESET patch to address original breakage)

Reported-by: Roland Dreier <roland@purestorage.com>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
drivers/target/target_core_tmr.c