summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_iblock.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-05-20 11:59:14 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2012-06-12 21:38:30 -0700
commit366e815ef199da797cab52566016e692442b5c60 (patch)
tree9cec3aeeb2659f29f5e2ec4a9e3604c4193cc718 /drivers/target/target_core_iblock.c
parent9dac90988a2a8683530064b2fe7c941e736cb95f (diff)
downloadlinux-366e815ef199da797cab52566016e692442b5c60.tar.gz
linux-366e815ef199da797cab52566016e692442b5c60.tar.xz
linux-366e815ef199da797cab52566016e692442b5c60.zip
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_iblock.c')
-rw-r--r--drivers/target/target_core_iblock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index fd47950727b4..244fff4aaf5a 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -653,6 +653,7 @@ static struct se_subsystem_api iblock_template = {
.allocate_virtdevice = iblock_allocate_virtdevice,
.create_virtdevice = iblock_create_virtdevice,
.free_device = iblock_free_device,
+ .parse_cdb = sbc_parse_cdb,
.execute_cmd = iblock_execute_cmd,
.do_discard = iblock_do_discard,
.do_sync_cache = iblock_emulate_sync_cache,