qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/12] block: introduce BDRV_REQ_MAY_UNMAP in bd


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 03/12] block: introduce BDRV_REQ_MAY_UNMAP in bdrv_co_write_zeroes
Date: Fri, 13 Sep 2013 12:07:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 09/13/2013 04:25 AM, Peter Lieven wrote:
> the BDRV_REQ_MAY_UNMAP flag is used to indicate that block driver
> is allowed to optimze a write zeroes request by unmapping (discarding)

s/optimze/optimize/

> blocks if it is guaranteed that the result will read back as
> zeroes.
> 
> the flag is only passed to the driver if the block device is
> opened with BDRV_O_UNMAP.
> 
> Signed-off-by: Peter Lieven <address@hidden>
> ---

> +++ b/include/block/block.h
> @@ -65,6 +65,7 @@ typedef struct BlockDevOps {
>  typedef enum {
>      BDRV_REQ_COPY_ON_READ = 0x1,
>      BDRV_REQ_ZERO_WRITE   = 0x2,
> +    BDRV_REQ_MAY_UNMAP    = 0x4,

Now that this enum is public, it would be useful to have inline
documentation, rather than making people dig up the git history of when
it was introduced to learn its semantics.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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