aboutsummaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-12 11:07:07 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2011-10-23 23:21:10 -0400
commit3189b067eeae4646f3c7fa0ed0d14659a682baa8 (patch)
treeb6e69465e1d79775e4afc2422e4067eea94dea3e /include/target
parent04629b7bde553e3703577779f53cb0ba1eddd2c0 (diff)
target: pack struct se_task more tightly
Rearrange the fields in se_task to avoid holes. Also increase the flags field to 16 bits as we have the space for it, and this makes adding new flags safer. 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.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 45291b23bc03..a6c23485068e 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -402,24 +402,24 @@ struct se_queue_obj {
402} ____cacheline_aligned; 402} ____cacheline_aligned;
403 403
404struct se_task { 404struct se_task {
405 unsigned char task_sense;
406 struct scatterlist *task_sg;
407 u32 task_sg_nents;
408 struct scatterlist *task_sg_bidi;
409 u8 task_scsi_status;
410 u8 task_flags;
411 int task_error_status;
412 unsigned long long task_lba; 405 unsigned long long task_lba;
413 u32 task_sectors; 406 u32 task_sectors;
414 u32 task_size; 407 u32 task_size;
408 struct se_cmd *task_se_cmd;
409 struct scatterlist *task_sg;
410 struct scatterlist *task_sg_bidi;
411 u32 task_sg_nents;
412 u16 task_flags;
413 u8 task_sense;
414 u8 task_scsi_status;
415 int task_error_status;
415 enum dma_data_direction task_data_direction; 416 enum dma_data_direction task_data_direction;
416 struct se_cmd *task_se_cmd; 417 atomic_t task_state_active;
417 struct completion task_stop_comp;
418 atomic_t task_state_active;
419 struct timer_list task_timer; 418 struct timer_list task_timer;
420 struct list_head t_list; 419 struct list_head t_list;
421 struct list_head t_execute_list; 420 struct list_head t_execute_list;
422 struct list_head t_state_list; 421 struct list_head t_state_list;
422 struct completion task_stop_comp;
423} ____cacheline_aligned; 423} ____cacheline_aligned;
424 424
425struct se_cmd { 425struct se_cmd {