qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v3 1/6] block: introduce prealloc_mode


From: Eric Blake
Subject: Re: [Qemu-devel] [RFC PATCH v3 1/6] block: introduce prealloc_mode
Date: Fri, 20 Dec 2013 05:36:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 12/18/2013 07:27 PM, Hu Tao wrote:
> This patch prepares for the subsequent patches.
> 
> Signed-off-by: Hu Tao <address@hidden>
> ---
>  block/qcow2.c         | 6 +++---
>  include/block/block.h | 6 ++++++
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 

> +++ b/include/block/block.h
> @@ -527,4 +527,10 @@ int bdrv_debug_remove_breakpoint(BlockDriverState *bs, 
> const char *tag);
>  int bdrv_debug_resume(BlockDriverState *bs, const char *tag);
>  bool bdrv_debug_is_suspended(BlockDriverState *bs, const char *tag);
>  
> +enum prealloc_mode {
> +    PREALLOC_OFF = 0,
> +    PREALLOC_METADATA,
> +    PREALLOC_FULL,
> +};

Why not make this a QAPI enum:

{ 'enum': 'PreallocMode', 'data': ['off', 'metadata', 'full'] }

After all, this is the sort of thing where we will eventually want to
select the prealloc mode of new files being created by online operations
such as snapshot creation.

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