qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 4/4] qapi/block-core: Add "new" qcow2 options


From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 4/4] qapi/block-core: Add "new" qcow2 options
Date: Wed, 20 Aug 2014 21:38:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 20.08.2014 21:36, Eric Blake wrote:
On 08/20/2014 11:59 AM, Max Reitz wrote:
qcow2 supports more than four options by now, add the new options
(overlap check mode and metadata cache size)

Signed-off-by: Max Reitz <address@hidden>
---
  qapi/block-core.json | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 78 insertions(+), 1 deletion(-)

+##
+# @Qcow2OverlapCheckFlags
+#
+# Structure of flags for each metadata structure. Setting a field to 'true'
+# makes qemu guard that structure against unintended overwriting. The default
+# value is chosen according to the template given.
+#
+# @template: Specifies a template mode which can be adjusted using the other
+#            flags, defaults to 'cached'
+#
Might be worth mentioning the other fields by name, but that's minor.

Well, there were so many and it would've just been "X: Prevent unintended writes to X".

+{ 'union': 'Qcow2OverlapChecks',
+  'discriminator': {},
+  'data': { 'flags': 'Qcow2OverlapCheckFlags',
+            'mode':  'Qcow2OverlapCheckMode' } }
+
Slick :)  So patch 3/4 added a new commandline option
overlap-check.template=str which behaves identically to
overlap-check=str; the short form is the enum branch of this union, the
long form is the struct form.  The command line parser has to deal with
both options being given (and errors out if they don't match), while QMP
does not.

Reviewed-by: Eric Blake <address@hidden>

Thank you!

Max



reply via email to

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