[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/4] qcow2: Add overlap-check.template option
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 3/4] qcow2: Add overlap-check.template option |
Date: |
Wed, 20 Aug 2014 13:22:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/20/2014 11:59 AM, Max Reitz wrote:
> Being able to set the overlap-check option to a string and then refine
> it via the overlap-check.* options is a nice idea for the command line
> but does not work so well for non-flattened dicts. In that case, one can
> only specify either but not both, so add a field to overlap-check.*
> which does the same as directly specifying overlap-check but can be used
> in conjunction with the other fields in non-flattened dicts.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> block/qcow2.c | 24 ++++++++++++++++++++++--
> block/qcow2.h | 1 +
> 2 files changed, 23 insertions(+), 2 deletions(-)
>
> diff --git a/block/qcow2.c b/block/qcow2.c
> index c64d611..c6099b5 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -403,6 +403,12 @@ static QemuOptsList qcow2_runtime_opts = {
> "templates (none, constant, cached, all)",
> },
> {
> + .name = QCOW2_OPT_OVERLAP_TEMPLATE,
> + .type = QEMU_OPT_STRING,
> + .help = "Selects which overlap checks to perform from a range of
> "
> + "templates (none, constant, cached, all)",
> + },
> + {
Okay, I see where this is headed. The QMP will allow either
'overlap-check':'all' (resolve all defaults according to a template
name), or 'overlap-check':{'template':'all','inactive-l1':'none'} (that
is, a struct, where the struct also sets a default but also provides
per-item overrides). It took me a couple of reads of this in tandem
with 4/4, but it looks correct.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature