aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-07-08 15:58:49 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-07-16 20:35:21 -0400
commitaf8772926f019b7bddd7477b8de5f3b0f12bad21 (patch)
tree99bdfc7335a3223985b033404fb06fc58cb754f0 /include/target
parentf314643751450a582c1ca40a54558240ef7cd4bf (diff)
target: replace the processing thread with a TMR work queue
The last functionality of the target processing thread is offloading possibly long running task management requests from the submitter context. To keep TMR semantics the same we need a single threaded ordered queue, which can be provided by a per-device workqueue with the right flags. 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.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 11052b24ee41..4f4f04219b11 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -147,7 +147,6 @@ enum transport_state_table {
147 TRANSPORT_WRITE_PENDING = 3, 147 TRANSPORT_WRITE_PENDING = 3,
148 TRANSPORT_PROCESSING = 5, 148 TRANSPORT_PROCESSING = 5,
149 TRANSPORT_COMPLETE = 6, 149 TRANSPORT_COMPLETE = 6,
150 TRANSPORT_PROCESS_TMR = 9,
151 TRANSPORT_ISTATE_PROCESSING = 11, 150 TRANSPORT_ISTATE_PROCESSING = 11,
152 TRANSPORT_COMPLETE_QF_WP = 18, 151 TRANSPORT_COMPLETE_QF_WP = 18,
153 TRANSPORT_COMPLETE_QF_OK = 19, 152 TRANSPORT_COMPLETE_QF_OK = 19,
@@ -464,13 +463,6 @@ struct t10_reservation {
464 struct t10_reservation_ops pr_ops; 463 struct t10_reservation_ops pr_ops;
465}; 464};
466 465
467struct se_queue_obj {
468 atomic_t queue_cnt;
469 spinlock_t cmd_queue_lock;
470 struct list_head qobj_list;
471 wait_queue_head_t thread_wq;
472};
473
474struct se_tmr_req { 466struct se_tmr_req {
475 /* Task Management function to be performed */ 467 /* Task Management function to be performed */
476 u8 function; 468 u8 function;
@@ -527,7 +519,6 @@ struct se_cmd {
527 /* Only used for internal passthrough and legacy TCM fabric modules */ 519 /* Only used for internal passthrough and legacy TCM fabric modules */
528 struct se_session *se_sess; 520 struct se_session *se_sess;
529 struct se_tmr_req *se_tmr_req; 521 struct se_tmr_req *se_tmr_req;
530 struct list_head se_queue_node;
531 struct list_head se_cmd_list; 522 struct list_head se_cmd_list;
532 struct completion cmd_wait_comp; 523 struct completion cmd_wait_comp;
533 struct kref cmd_kref; 524 struct kref cmd_kref;
@@ -774,7 +765,6 @@ struct se_device {
774 struct se_obj dev_obj; 765 struct se_obj dev_obj;
775 struct se_obj dev_access_obj; 766 struct se_obj dev_access_obj;
776 struct se_obj dev_export_obj; 767 struct se_obj dev_export_obj;
777 struct se_queue_obj dev_queue_obj;
778 spinlock_t delayed_cmd_lock; 768 spinlock_t delayed_cmd_lock;
779 spinlock_t execute_task_lock; 769 spinlock_t execute_task_lock;
780 spinlock_t dev_reservation_lock; 770 spinlock_t dev_reservation_lock;
@@ -790,8 +780,7 @@ struct se_device {
790 struct t10_pr_registration *dev_pr_res_holder; 780 struct t10_pr_registration *dev_pr_res_holder;
791 struct list_head dev_sep_list; 781 struct list_head dev_sep_list;
792 struct list_head dev_tmr_list; 782 struct list_head dev_tmr_list;
793 /* Pointer to descriptor for processing thread */ 783 struct workqueue_struct *tmr_wq;
794 struct task_struct *process_thread;
795 struct work_struct qf_work_queue; 784 struct work_struct qf_work_queue;
796 struct list_head delayed_cmd_list; 785 struct list_head delayed_cmd_list;
797 struct list_head state_list; 786 struct list_head state_list;