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>
This commit is contained in:
Nicholas Bellinger
2011-07-21 04:41:48 +00:00
parent 6708bb27bb
commit 1d20bb6147
4 changed files with 42 additions and 29 deletions

View File

@@ -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():
*/