aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-12 11:07:04 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:21:08 -0400
commit04629b7bde553e3703577779f53cb0ba1eddd2c0 (patch)
tree0ad137523361599cdd4c16daad11d6bab2893511 /include/target
parent6c76bf951cb099f5573954b1f56c1121c3a41c72 (diff)
target: Remove unnecessary se_task members
This is a squashed version of the following unnecessary se_task structure member removal patches: target: remove the task_execute_queue field in se_task Instead of using a separate flag we can simply do list_emptry checks on t_execute_list if we make sure to always use list_del_init to remove a task from the list. Also factor some duplicate code into a new __transport_remove_task_from_execute_queue helper. target: remove the read-only task_no field in se_task The task_no field never was initialized and only used in debug printks, so kill it. target: remove the task_padded_sg field in se_task This field is only check in one place and not actually needed there. Rationale: - transport_do_task_sg_chain asserts that we have task_sg_chaining set early on - we only make use of the sg_prev_nents field we calculate based on it if there is another sg list that gets chained onto this one, which never happens for the last (or only) task. 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.h3
-rw-r--r--include/target/target_core_transport.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 5e3dd1418bac..45291b23bc03 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -409,15 +409,12 @@ struct se_task {
409 u8 task_scsi_status; 409 u8 task_scsi_status;
410 u8 task_flags; 410 u8 task_flags;
411 int task_error_status; 411 int task_error_status;
412 bool task_padded_sg;
413 unsigned long long task_lba; 412 unsigned long long task_lba;
414 u32 task_no;
415 u32 task_sectors; 413 u32 task_sectors;
416 u32 task_size; 414 u32 task_size;
417 enum dma_data_direction task_data_direction; 415 enum dma_data_direction task_data_direction;
418 struct se_cmd *task_se_cmd; 416 struct se_cmd *task_se_cmd;
419 struct completion task_stop_comp; 417 struct completion task_stop_comp;
420 atomic_t task_execute_queue;
421 atomic_t task_state_active; 418 atomic_t task_state_active;
422 struct timer_list task_timer; 419 struct timer_list task_timer;
423 struct list_head t_list; 420 struct list_head t_list;
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h
index c93cf0ae37a4..c5eb259c2e2f 100644
--- a/include/target/target_core_transport.h
+++ b/include/target/target_core_transport.h
@@ -135,6 +135,8 @@ extern void transport_add_task_to_execute_queue(struct se_task *,
135 struct se_device *); 135 struct se_device *);
136extern void transport_remove_task_from_execute_queue(struct se_task *, 136extern void transport_remove_task_from_execute_queue(struct se_task *,
137 struct se_device *); 137 struct se_device *);
138extern void __transport_remove_task_from_execute_queue(struct se_task *,
139 struct se_device *);
138unsigned char *transport_dump_cmd_direction(struct se_cmd *); 140unsigned char *transport_dump_cmd_direction(struct se_cmd *);
139extern void transport_dump_dev_state(struct se_device *, char *, int *); 141extern void transport_dump_dev_state(struct se_device *, char *, int *);
140extern void transport_dump_dev_info(struct se_device *, struct se_lun *, 142extern void transport_dump_dev_info(struct se_device *, struct se_lun *,