qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] scsi: support NDOB (no data-out buffer) for WRI


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] scsi: support NDOB (no data-out buffer) for WRITE SAME commands
Date: Fri, 9 Mar 2018 12:40:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 09/03/2018 10:24, Fam Zheng wrote:
> The standard says this bit is only allowed when UNMAP is set. Do we want to
> check it here? I.e.
> 
>            if (!flags && (req->cmd.buf[1] & 0x1)) {
>                scsi_check_condition(r, SENSE_CODE(INVALID_FIELD));
>                return;
>            }

Yeah, I had it like that before but my copy of the standard actually
doesn't say that.  It says:

---
To ensure that subsequent read operations return all zeros in a logical
block, use the WRITE SAME (16) command with the NDOB bit set to one. If
the UNMAP bit is set to one, then the device server may unmap the
logical blocks specified by the WRITE SAME (16) command as described in
4.7.3.4.4.

[...]

A NDOB bit set to zero specifies that the device server shall process
the command using logical block data from the Data-Out Buffer. A NDOB
bit set to one specifies that the device server 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.
---

This is sbc4r04, and sbc4r15 (the latest) is more or less the same, with
some complications related because LBPRZ has been recently extended.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]