summaryrefslogtreecommitdiffstats
path: root/include/target/target_core_base.h
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2011-07-19 10:26:37 +0000
committerNicholas Bellinger <nab@linux-iscsi.org>2011-07-22 09:37:43 +0000
commit5951146dea1ac8ff2f177477c907084d63913cad (patch)
tree699cb7c498ca1799ae3e349cb4360171d9fa63e0 /include/target/target_core_base.h
parentf22c119683e73498d8126581a1be75e1b7a339a3 (diff)
downloadlinux-5951146dea1ac8ff2f177477c907084d63913cad.tar.gz
linux-5951146dea1ac8ff2f177477c907084d63913cad.tar.xz
linux-5951146dea1ac8ff2f177477c907084d63913cad.zip
target: More core cleanups from AGrover (round 2)
This patch contains the squashed version of second round of target core cleanups and simplifications and Andy and Co. It also contains a handful of fixes to address bugs the original series and other minor cleanups. Here is the condensed shortlog: target: Remove unneeded casts to void* target: Rename get_lun_for_{cmd,tmr} to lookup_{cmd,tmr}_lun target: Make t_task a member of se_cmd, not a pointer target: Handle functions returning "-2" target: Use cmd->se_dev over cmd->se_lun->lun_se_dev target: Embed qr in struct se_cmd target: Replace embedded struct se_queue_req with a list_head target: Rename list_heads that are nodes in struct se_cmd to "*_node" target: Fold transport_device_setup_cmd() into lookup_{tmr,cmd}_lun() target: Make t_mem_list and t_mem_list_bidi members of t_task target: Add comment & cleanup transport_map_sg_to_mem() target: Remove unneeded checks in transport_free_pages() (Roland: Fix se_queue_req removal leftovers OOPs) (nab: Fix transport_lookup_tmr_lun failure case) (nab: Fix list_empty(&cmd->t_task.t_mem_bidi_list) inversion bugs) Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target/target_core_base.h')
-rw-r--r--include/target/target_core_base.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index b0b83edbe453..94c838dcfc3c 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -123,7 +123,7 @@ enum se_cmd_flags_table {
SCF_SENT_DELAYED_TAS = 0x00020000,
SCF_ALUA_NON_OPTIMIZED = 0x00040000,
SCF_DELAYED_CMD_FROM_SAM_ATTR = 0x00080000,
- SCF_PASSTHROUGH_SG_TO_MEM = 0x00100000,
+ SCF_UNUSED = 0x00100000,
SCF_PASSTHROUGH_CONTIG_TO_SG = 0x00200000,
SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC = 0x00400000,
SCF_EMULATE_SYNC_CACHE = 0x00800000,
@@ -452,9 +452,9 @@ struct se_transport_task {
* and other HW target mode fabric modules.
*/
struct scatterlist *t_task_pt_sgl;
- struct list_head *t_mem_list;
+ struct list_head t_mem_list;
/* Used for BIDI READ */
- struct list_head *t_mem_bidi_list;
+ struct list_head t_mem_bidi_list;
struct list_head t_task_list;
} ____cacheline_aligned;
@@ -523,9 +523,9 @@ struct se_cmd {
atomic_t transport_sent;
/* Used for sense data */
void *sense_buffer;
- struct list_head se_delayed_list;
- struct list_head se_ordered_list;
- struct list_head se_lun_list;
+ struct list_head se_delayed_node;
+ struct list_head se_ordered_node;
+ struct list_head se_lun_node;
struct se_device *se_dev;
struct se_dev_entry *se_deve;
struct se_device *se_obj_ptr;
@@ -534,9 +534,8 @@ struct se_cmd {
/* Only used for internal passthrough and legacy TCM fabric modules */
struct se_session *se_sess;
struct se_tmr_req *se_tmr_req;
- /* t_task is setup to t_task_backstore in transport_init_se_cmd() */
- struct se_transport_task *t_task;
- struct se_transport_task t_task_backstore;
+ struct se_transport_task t_task;
+ struct list_head se_queue_node;
struct target_core_fabric_ops *se_tfo;
int (*transport_emulate_cdb)(struct se_cmd *);
void (*transport_split_cdb)(unsigned long long, u32 *, unsigned char *);