Commit 09ceadc7 authored by Roland Dreier's avatar Roland Dreier Committed by Nicholas Bellinger

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: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent e5c0d6ad
...@@ -581,7 +581,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -581,7 +581,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
pr_err("cmd exceeds last lba %llu " pr_err("cmd exceeds last lba %llu "
"(lba %llu, sectors %u)\n", "(lba %llu, sectors %u)\n",
end_lba, cmd->t_task_lba, sectors); end_lba, cmd->t_task_lba, sectors);
return TCM_INVALID_CDB_FIELD; return TCM_ADDRESS_OUT_OF_RANGE;
} }
size = sbc_get_size(cmd, sectors); size = sbc_get_size(cmd, sectors);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment