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.
+{ '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>