aboutsummaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-12 11:07:03 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-24 03:21:06 +0000
commit6c76bf951cb099f5573954b1f56c1121c3a41c72 (patch)
treee9b739b4fb28ae7e2be2fdf400dc4772d63360b8 /include/target
parent42bf829eee0e36371a3df43978b14572c716cbe7 (diff)
target: make more use of the task_flags field in se_task
Replace various atomic_t variables that were mostly under t_state_lock with new flags in task_flags. Note that the execution error path didn't take t_state_lock before, so add it there. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 6c49db40320..5e3dd1418ba 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -72,9 +72,13 @@ enum transport_tpg_type_table {
};
/* Used for generate timer flags */
-enum timer_flags_table {
- TF_RUNNING = 0x01,
- TF_STOP = 0x02,
+enum se_task_flags {
+ TF_ACTIVE = (1 << 0),
+ TF_SENT = (1 << 1),
+ TF_TIMEOUT = (1 << 2),
+ TF_REQUEST_STOP = (1 << 3),
+ TF_TIMER_RUNNING = (1 << 4),
+ TF_TIMER_STOP = (1 << 5),
};
/* Special transport agnostic struct se_cmd->t_states */
@@ -413,11 +417,7 @@ struct se_task {
enum dma_data_direction task_data_direction;
struct se_cmd *task_se_cmd;
struct completion task_stop_comp;
- atomic_t task_active;
atomic_t task_execute_queue;
- atomic_t task_timeout;
- atomic_t task_sent;
- atomic_t task_stop;
atomic_t task_state_active;
struct timer_list task_timer;
struct list_head t_list;