target: replace various cmd flags with a transport state
authorChristoph Hellwig <hch@infradead.org>
Wed, 21 Dec 2011 19:13:47 +0000 (14:13 -0500)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 25 Feb 2012 22:37:45 +0000 (14:37 -0800)
commit7d680f3b74dd6f0f57569eeeee8c257790ceaa96
treee0797ab722c222213b7cbe4fa9ba4a61db2d8b0c
parentb01543dfe67bb1d191998e90d20534dc354de059
target: replace various cmd flags with a transport state

Replace various atomic_ts used as flags in struct se_cmd with a single
transport_state bitmap that requires t_state_lock to be held for modifications.

In the target core that assumption generally is true, but some recently added
code in the SRP target had to grow new lock calls.  I can't say I like the way
how it messes with the command state directly, but let's leave that for later.

(Re-add missing ib_srpt.c changes that nab dropped..)

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/infiniband/ulp/srpt/ib_srpt.c
drivers/target/iscsi/iscsi_target.c
drivers/target/iscsi/iscsi_target_erl1.c
drivers/target/iscsi/iscsi_target_tmr.c
drivers/target/target_core_tmr.c
drivers/target/target_core_transport.c
include/target/target_core_base.h