target: Re-org of core_tmr_lun_reset
commit0ff8844071f0ede41221a137db54736c11f56e8e
authorNicholas Bellinger <nab@linux-iscsi.org>
Thu, 29 Sep 2011 04:37:29 +0000 (28 21:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:42:35 +0000 (11 09:42 -0800)
tree07a2b54c433a9d34d13e445fc1a9f006e3e18dc1
parent0667cc007504db38b2a831da7e8b6a642ba9722f
target: Re-org of core_tmr_lun_reset

commit d050ffb922c782f092234611b9019e95024481ab upstream.

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>
Signed-off-by: Nicholas Bellinger <nab@risingtidesystems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/target/target_core_tmr.c