On 04/21/2018 08:29 AM, Max Reitz wrote:
> This flag signifies that a write request will not change the visible
> disk content.  With this flag set, it is sufficient to have the
> BLK_PERM_WRITE_UNCHANGED permission instead of BLK_PERM_WRITE.
> 
> Signed-off-by: Max Reitz <mre...@redhat.com>
> Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
> Reviewed-by: Alberto Garcia <be...@igalia.com>
> ---
>  include/block/block.h | 6 +++++-
>  block/io.c            | 6 +++++-
>  2 files changed, 10 insertions(+), 2 deletions(-)

Since patch 5 adds an instance of a driver setting supported_write_flags
= BDRV_REQ_WRITE_UNCHANGED, I think this patch should tweak the
documentation of supported_write_flags (and supported_zero_flags?) in
block_int.h to mention that drivers can opt-in to supporting this
particular flag (rather than it being handled completely at the block
layer).

Also, that does raise the question of whether you have more work to
support write-zero requests with WRITE_UNCHANGED (which indeed sounds
like something plausible to support).

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to