mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-05 05:42:36 +00:00
target: Fix VERIFY_16 handling in sbc_parse_cdb
As reported by Max, the Windows 2008 R2 chkdsk utility expects VERIFY_16 to be supported, and does not handle the returned CHECK_CONDITION properly, resulting in an infinite loop. The kernel will log huge amounts of this error: kernel: TARGET_CORE[iSCSI]: Unsupported SCSI Opcode 0x8f, sending CHECK_CONDITION. Signed-off-by: Max Lohrmann <post@wickenrode.com> Cc: <stable@vger.kernel.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
parent
a04e54f2c3
commit
13603685c1
1 changed files with 8 additions and 2 deletions
|
@ -1105,9 +1105,15 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
|
||||||
return ret;
|
return ret;
|
||||||
break;
|
break;
|
||||||
case VERIFY:
|
case VERIFY:
|
||||||
|
case VERIFY_16:
|
||||||
size = 0;
|
size = 0;
|
||||||
sectors = transport_get_sectors_10(cdb);
|
if (cdb[0] == VERIFY) {
|
||||||
cmd->t_task_lba = transport_lba_32(cdb);
|
sectors = transport_get_sectors_10(cdb);
|
||||||
|
cmd->t_task_lba = transport_lba_32(cdb);
|
||||||
|
} else {
|
||||||
|
sectors = transport_get_sectors_16(cdb);
|
||||||
|
cmd->t_task_lba = transport_lba_64(cdb);
|
||||||
|
}
|
||||||
cmd->execute_cmd = sbc_emulate_noop;
|
cmd->execute_cmd = sbc_emulate_noop;
|
||||||
goto check_lba;
|
goto check_lba;
|
||||||
case REZERO_UNIT:
|
case REZERO_UNIT:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue