On 05/02/2018 09:03 AM, Max Reitz wrote:
Add BDRV_REQ_WRITE_UNCHANGED to the list of flags honored during pwrite
and pwrite_zeroes, and also add a note on when you absolutely need to
support it.

Signed-off-by: Max Reitz <mre...@redhat.com>
---

Thanks, that helps.

Reviewed-by: Eric Blake <ebl...@redhat.com>

I did not include a note on how this might be useful to protocol
drivers, because BDRV_REQ_WRITE_UNCHANGED requests will usually not end
up on the protocol level anyway.
(I suppose it would be possible in theory if a protocol driver reports a
  certain range as unallocated and the user installs a copy-on-read
  driver on top, but I think every protocol driver currently reports
  everything as allocated.)

It doesn't help that I still haven't revisited an audit of whether all the protocol drivers have a sane status return to begin with (fallout from Kevin's review of my byte-based block status that landed in 2.12). But that doesn't hold up this patch.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to