diff options
author | Roland Dreier <roland@purestorage.com> | 2013-06-26 17:36:18 -0700 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2013-07-07 18:36:45 -0700 |
commit | 09ceadc70383a4105c0372f9e83da2c0cb0a8017 (patch) | |
tree | e61bfe80684b47852ee972a7c195dec4e664435a /drivers/target/target_core_sbc.c | |
parent | e5c0d6ad557b32f431a70a4efba820430f6ff88b (diff) | |
download | linux-09ceadc70383a4105c0372f9e83da2c0cb0a8017.tar.bz2 |
target: Return correct sense data for IO past the end of a device
We should use TCM_ADDRESS_OUT_OF_RANGE (-> sense data LOGICAL BLOCK
ADDRESS OUT OF RANGE) for IOs past the end of a device instead of
INVALID FIELD IN CDB.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_sbc.c')
-rw-r--r-- | drivers/target/target_core_sbc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index bbc5b0ee2bdc..ee0cb9d96929 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -581,7 +581,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) pr_err("cmd exceeds last lba %llu " "(lba %llu, sectors %u)\n", end_lba, cmd->t_task_lba, sectors); - return TCM_INVALID_CDB_FIELD; + return TCM_ADDRESS_OUT_OF_RANGE; } size = sbc_get_size(cmd, sectors); |