diff options
author | Christoph Hellwig <hch@infradead.org> | 2012-05-20 15:59:14 (GMT) |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-07-17 00:25:56 (GMT) |
commit | d6e0175cf3f9737a760482d185bb73566bcc9331 (patch) | |
tree | 99ca8361ebc8c4e83f8335193963faa3f30007b5 /drivers/target/target_core_file.c | |
parent | 88455ec4be02c395820b1ff57656b0844ec03ac3 (diff) | |
download | linux-d6e0175cf3f9737a760482d185bb73566bcc9331.tar.xz |
target: add a parse_cdb method to the backend drivers
Instead of trying to handle all SCSI command sets in one function
(transport_generic_cmd_sequencer) call out to the backend driver to perform
this functionality. For pSCSI a copy of the existing code is used, but for
all virtual backends we can use a new parse_sbc_cdb helper is used to
provide a simple SBC emulation.
For now this setups means a fair amount of duplication between pSCSI and the
SBC library, but patches later in this series will sort out that problem.
(nab: Fix up build failure in target_core_pscsi.c)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_file.c')
-rw-r--r-- | drivers/target/target_core_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c index 9f99d04..e2df308 100644 --- a/drivers/target/target_core_file.c +++ b/drivers/target/target_core_file.c @@ -561,6 +561,7 @@ static struct se_subsystem_api fileio_template = { .allocate_virtdevice = fd_allocate_virtdevice, .create_virtdevice = fd_create_virtdevice, .free_device = fd_free_device, + .parse_cdb = sbc_parse_cdb, .execute_cmd = fd_execute_cmd, .do_sync_cache = fd_emulate_sync_cache, .check_configfs_dev_params = fd_check_configfs_dev_params, |