target: make the ->get_cdb method optional

The most commonly used file, iblock and rd backends have no use for
a per-task CDB and thus don't need a method to copy it into their
otherwise unused CDB fields.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Christoph Hellwig
2011-10-12 11:09:11 -04:00
committed by Nicholas Bellinger
parent 3189b067ee
commit 6193f06e6f
7 changed files with 15 additions and 48 deletions

View File

@@ -609,17 +609,6 @@ static ssize_t fd_show_configfs_dev_params(
return bl;
}
/* fd_get_cdb(): (Part of se_subsystem_api_t template)
*
*
*/
static unsigned char *fd_get_cdb(struct se_task *task)
{
struct fd_request *req = FILE_REQ(task);
return req->fd_scsi_cdb;
}
/* fd_get_device_rev(): (Part of se_subsystem_api_t template)
*
*
@@ -667,7 +656,6 @@ static struct se_subsystem_api fileio_template = {
.check_configfs_dev_params = fd_check_configfs_dev_params,
.set_configfs_dev_params = fd_set_configfs_dev_params,
.show_configfs_dev_params = fd_show_configfs_dev_params,
.get_cdb = fd_get_cdb,
.get_device_rev = fd_get_device_rev,
.get_device_type = fd_get_device_type,
.get_blocks = fd_get_blocks,