diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-04-24 00:25:05 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-06 18:11:26 -0400 |
commit | cf572a9627c9ae86082216de109780c1d2e2ee28 (patch) | |
tree | fe6eec75bc3c388534390efe3be2b3b2c4c93903 /include/target | |
parent | 785fdf70b2b46588c973ad8b65ed62871994452f (diff) |
target: move the state and execute lists to the command
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.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 382542af3120..9ea87e68275d 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h | |||
@@ -140,14 +140,6 @@ enum transport_tpg_type_table { | |||
140 | TRANSPORT_TPG_TYPE_DISCOVERY = 1, | 140 | TRANSPORT_TPG_TYPE_DISCOVERY = 1, |
141 | }; | 141 | }; |
142 | 142 | ||
143 | /* struct se_task->task_flags */ | ||
144 | enum se_task_flags { | ||
145 | TF_ACTIVE = (1 << 0), | ||
146 | TF_SENT = (1 << 1), | ||
147 | TF_REQUEST_STOP = (1 << 2), | ||
148 | TF_HAS_SENSE = (1 << 3), | ||
149 | }; | ||
150 | |||
151 | /* Special transport agnostic struct se_cmd->t_states */ | 143 | /* Special transport agnostic struct se_cmd->t_states */ |
152 | enum transport_state_table { | 144 | enum transport_state_table { |
153 | TRANSPORT_NO_STATE = 0, | 145 | TRANSPORT_NO_STATE = 0, |
@@ -489,13 +481,8 @@ struct se_task { | |||
489 | struct se_cmd *task_se_cmd; | 481 | struct se_cmd *task_se_cmd; |
490 | struct scatterlist *task_sg; | 482 | struct scatterlist *task_sg; |
491 | u32 task_sg_nents; | 483 | u32 task_sg_nents; |
492 | u16 task_flags; | ||
493 | u8 task_scsi_status; | 484 | u8 task_scsi_status; |
494 | enum dma_data_direction task_data_direction; | 485 | enum dma_data_direction task_data_direction; |
495 | struct list_head t_execute_list; | ||
496 | struct list_head t_state_list; | ||
497 | bool t_state_active; | ||
498 | struct completion task_stop_comp; | ||
499 | }; | 486 | }; |
500 | 487 | ||
501 | struct se_tmr_req { | 488 | struct se_tmr_req { |
@@ -583,6 +570,8 @@ struct se_cmd { | |||
583 | #define CMD_T_LUN_STOP (1 << 7) | 570 | #define CMD_T_LUN_STOP (1 << 7) |
584 | #define CMD_T_LUN_FE_STOP (1 << 8) | 571 | #define CMD_T_LUN_FE_STOP (1 << 8) |
585 | #define CMD_T_DEV_ACTIVE (1 << 9) | 572 | #define CMD_T_DEV_ACTIVE (1 << 9) |
573 | #define CMD_T_REQUEST_STOP (1 << 10) | ||
574 | #define CMD_T_BUSY (1 << 11) | ||
586 | spinlock_t t_state_lock; | 575 | spinlock_t t_state_lock; |
587 | struct completion t_transport_stop_comp; | 576 | struct completion t_transport_stop_comp; |
588 | struct completion transport_lun_fe_stop_comp; | 577 | struct completion transport_lun_fe_stop_comp; |
@@ -596,6 +585,13 @@ struct se_cmd { | |||
596 | struct scatterlist *t_bidi_data_sg; | 585 | struct scatterlist *t_bidi_data_sg; |
597 | unsigned int t_bidi_data_nents; | 586 | unsigned int t_bidi_data_nents; |
598 | 587 | ||
588 | struct list_head execute_list; | ||
589 | struct list_head state_list; | ||
590 | bool state_active; | ||
591 | |||
592 | /* old task stop completion, consider merging with some of the above */ | ||
593 | struct completion task_stop_comp; | ||
594 | |||
599 | struct se_task *t_task; | 595 | struct se_task *t_task; |
600 | }; | 596 | }; |
601 | 597 | ||
@@ -820,8 +816,8 @@ struct se_device { | |||
820 | struct task_struct *process_thread; | 816 | struct task_struct *process_thread; |
821 | struct work_struct qf_work_queue; | 817 | struct work_struct qf_work_queue; |
822 | struct list_head delayed_cmd_list; | 818 | struct list_head delayed_cmd_list; |
823 | struct list_head execute_task_list; | 819 | struct list_head execute_list; |
824 | struct list_head state_task_list; | 820 | struct list_head state_list; |
825 | struct list_head qf_cmd_list; | 821 | struct list_head qf_cmd_list; |
826 | /* Pointer to associated SE HBA */ | 822 | /* Pointer to associated SE HBA */ |
827 | struct se_hba *se_hba; | 823 | struct se_hba *se_hba; |