mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
scsi: support NDOB (no data-out buffer) for WRITE SAME commands
A NDOB bit set to one specifies that the disk shall not transfer data from the data-out buffer and shall process the command as if the data-out buffer contained user data set to all zeroes. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
05b6cc4ae2
commit
4397a01847
3 changed files with 8 additions and 2 deletions
|
@ -1807,7 +1807,7 @@ static void scsi_disk_emulate_write_same(SCSIDiskReq *r, uint8_t *inbuf)
|
|||
return;
|
||||
}
|
||||
|
||||
if (buffer_is_zero(inbuf, s->qdev.blocksize)) {
|
||||
if ((req->cmd.buf[1] & 0x1) || buffer_is_zero(inbuf, s->qdev.blocksize)) {
|
||||
int flags = (req->cmd.buf[1] & 0x8) ? BDRV_REQ_MAY_UNMAP : 0;
|
||||
|
||||
/* The request is used as the AIO opaque value, so add a ref. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue