提交 c52716de 编写于 作者: C Christophe Vu-Brugier 提交者: Nicholas Bellinger

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: NChristophe Vu-Brugier <cvubrugier@yahoo.fr>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 6ef31dc7
...@@ -914,8 +914,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops) ...@@ -914,8 +914,10 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
break; break;
case VERIFY: case VERIFY:
size = 0; size = 0;
sectors = transport_get_sectors_10(cdb);
cmd->t_task_lba = transport_lba_32(cdb);
cmd->execute_cmd = sbc_emulate_noop; cmd->execute_cmd = sbc_emulate_noop;
break; goto check_lba;
case REZERO_UNIT: case REZERO_UNIT:
case SEEK_6: case SEEK_6:
case SEEK_10: case SEEK_10:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册