提交 9f6cb916 编写于 作者: P Paolo Bonzini 提交者: Michael Roth

scsi-block: fix direction of BYTCHK test for VERIFY commands

The direction is wrong; scsi_block_is_passthrough returns
false for commands that *can* use sglists.
Reported-by: NZhang Qian <zhangqian@sangfor.com.cn>
Fixes: 8fdc7839
Cc: qemu-stable@nongnu.org
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 1f8af0d1)
Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
上级 dc659e3a
......@@ -2694,7 +2694,7 @@ static bool scsi_block_is_passthrough(SCSIDiskState *s, uint8_t *buf)
* for the number of logical blocks specified in the length
* field). For other modes, do not use scatter/gather operation.
*/
if ((buf[1] & 6) != 2) {
if ((buf[1] & 6) == 2) {
return false;
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册