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).