aboutsummaryrefslogtreecommitdiffstats
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-23 23:21:06 -0400
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 6c49db403205..5e3dd1418bac 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -72,9 +72,13 @@ enum transport_tpg_type_table {
72}; 72};
73 73
74/* Used for generate timer flags */ 74/* Used for generate timer flags */
75enum timer_flags_table { 75enum se_task_flags {
76 TF_RUNNING = 0x01, 76 TF_ACTIVE = (1 << 0),
77 TF_STOP = 0x02, 77 TF_SENT = (1 << 1),
78 TF_TIMEOUT = (1 << 2),
79 TF_REQUEST_STOP = (1 << 3),
80 TF_TIMER_RUNNING = (1 << 4),
81 TF_TIMER_STOP = (1 << 5),
78}; 82};
79 83
80/* Special transport agnostic struct se_cmd->t_states */ 84/* Special transport agnostic struct se_cmd->t_states */
@@ -413,11 +417,7 @@ struct se_task {
413 enum dma_data_direction task_data_direction; 417 enum dma_data_direction task_data_direction;
414 struct se_cmd *task_se_cmd; 418 struct se_cmd *task_se_cmd;
415 struct completion task_stop_comp; 419 struct completion task_stop_comp;
416 atomic_t task_active;
417 atomic_t task_execute_queue; 420 atomic_t task_execute_queue;
418 atomic_t task_timeout;
419 atomic_t task_sent;
420 atomic_t task_stop;
421 atomic_t task_state_active; 421 atomic_t task_state_active;
422 struct timer_list task_timer; 422 struct timer_list task_timer;
423 struct list_head t_list; 423 struct list_head t_list;