qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_d


From: Eric Blake
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH v2 1/3] block: Extrace bdrv_parse_detect_zeroes_flags
Date: Mon, 08 Jun 2015 08:17:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 06/08/2015 04:34 AM, Fam Zheng wrote:
> The logic will be shared with qmp_drive_mirror.

s/Extrace/Extract/ in the subject

> 
> Signed-off-by: Fam Zheng <address@hidden>
> ---
>  block.c               | 26 ++++++++++++++++++++++++++
>  blockdev.c            | 14 ++------------
>  include/block/block.h |  3 +++
>  3 files changed, 31 insertions(+), 12 deletions(-)
> 

> +
> +    if (detect_zeroes == BLOCKDEV_DETECT_ZEROES_OPTIONS_UNMAP &&
> +        !(bdrv_flags & BDRV_O_UNMAP)) {
> +        error_setg(errp, "setting detect-zeroes to unmap is not allowed "
> +                         "without setting discard operation to unmap");
> +    }

I think it might be better to have a tri-state enum, than to have two
competing bools where only 3 of the 4 states are valid.  We haven't yet
committed to the 'unmap' bool, so we still have time to get the API right.

-- 
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]