summaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorChristoph Hellwig2011-10-12 17:09:12 +0200
committerNicholas Bellinger2011-10-24 05:21:13 +0200
commit485fd0d1e3b8010b538bd0b209f3592acc825677 (patch)
treea13b8785b9b24fcec032b9f28fd06597edae7256 /include/target
parenttarget: make the ->get_cdb method optional (diff)
downloadkernel-qcow2-linux-485fd0d1e3b8010b538bd0b209f3592acc825677.tar.gz
kernel-qcow2-linux-485fd0d1e3b8010b538bd0b209f3592acc825677.tar.xz
kernel-qcow2-linux-485fd0d1e3b8010b538bd0b209f3592acc825677.zip
target: replace ->get_cdb with a target_get_task_cdb helper
Instead of calling out to the backends from the core to get a per-task CDB and then modify it for the LBA/len pair used for this CDB provide a helper that writes the adjusted CDB into a provided buffer and call this method from ->do_task in pscsi. 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_transport.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h
index c5eb259c2e2f..171c2359bc79 100644
--- a/include/target/target_core_transport.h
+++ b/include/target/target_core_transport.h
@@ -190,6 +190,7 @@ extern int transport_generic_do_tmr(struct se_cmd *);
extern int core_alua_check_nonop_delay(struct se_cmd *);
/* From target_core_cdb.c */
extern int transport_emulate_control_cdb(struct se_task *);
+extern void target_get_task_cdb(struct se_task *task, unsigned char *cdb);
/*
* Each se_transport_task_t can have N number of possible struct se_task's
@@ -309,10 +310,6 @@ struct se_subsystem_api {
ssize_t (*show_configfs_dev_params)(struct se_hba *, struct se_subsystem_dev *,
char *);
/*
- * get_cdb():
- */
- unsigned char *(*get_cdb)(struct se_task *);
- /*
* get_device_rev():
*/
u32 (*get_device_rev)(struct se_device *);