summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorChristophe Vu-Brugier <cvubrugier@yahoo.fr>2014-06-10 17:53:22 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-06-11 11:52:40 -0700
commitc52716defd6ec7e89c510c740de7ec3478008f28 (patch)
tree43c0534aa3289555eac9ab3b231ffcdef9cf59d0 /drivers/target
parent6ef31dc720cff4dc6a67ccb8c73c56dbf2ea6a08 (diff)
downloadop-kernel-dev-c52716defd6ec7e89c510c740de7ec3478008f28.zip
op-kernel-dev-c52716defd6ec7e89c510c740de7ec3478008f28.tar.gz
target/sbc: Check that the LBA and number of blocks are correct in VERIFY
This patch extracts LBA + sectors for VERIFY, and adds a goto check_lba to perform the end-of-device checking. (Update patch to drop lba_check usage - nab) Signed-off-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_sbc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 7675d2a..97a3360 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -914,8 +914,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
break;
case VERIFY:
size = 0;
+ sectors = transport_get_sectors_10(cdb);
+ cmd->t_task_lba = transport_lba_32(cdb);
cmd->execute_cmd = sbc_emulate_noop;
- break;
+ goto check_lba;
case REZERO_UNIT:
case SEEK_6:
case SEEK_10:
OpenPOWER on IntegriCloud