aboutsummaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2011-07-21 04:41:48 +0000
committerNicholas Bellinger <nab@linux-iscsi.org>2011-07-22 09:37:48 +0000
commit1d20bb6147954d4fbd337a3d1b40c7eeae254cd7 (patch)
tree23dcdd9376c5e26acfd2817812e2d5ccfbf81149 /include/target
parent6708bb27bb2703da238f21f516034263348af5be (diff)
target: ->map_task_SG conversion to ->map_control_SG and ->map_data_SG
This patch breaks up the ->map_task_SG() backend call into two seperate ->map_control_SG() and ->map_data_SG() in order to better address IBLOCK and pSCSI. IBLOCK only allocates bios for ->map_data_SG(), and pSCSI will allocate a struct request for both cases. This patch fixes incorrect usage of ->map_task_SG() for all se_cmd descriptors in transport_generic_new_cmd() by moving the call into it's proper location directly inside of transport_allocate_data_tasks() Reported-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_transport.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h
index 740957655a6..54af39d8e3f 100644
--- a/include/target/target_core_transport.h
+++ b/include/target/target_core_transport.h
@@ -239,9 +239,13 @@ struct se_subsystem_api {
*/
int (*cdb_none)(struct se_task *);
/*
- * For SCF_SCSI_DATA_SG_IO_CDB and SCF_SCSI_CONTROL_SG_IO_CDB
+ * For SCF_SCSI_DATA_SG_IO_CDB
*/
- int (*map_task_SG)(struct se_task *);
+ int (*map_data_SG)(struct se_task *);
+ /*
+ * For SCF_SCSI_CONTROL_SG_IO_CDB
+ */
+ int (*map_control_SG)(struct se_task *);
/*
* attach_hba():
*/