]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Use visitor for options in qcow2_create()
authorKevin Wolf <kwolf@redhat.com>
Thu, 11 Jan 2018 15:18:08 +0000 (16:18 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 9 Mar 2018 14:17:47 +0000 (15:17 +0100)
commitb76b4f604521e59f857d6177bc55f6f2e41fd392
tree27205e373895cab07c2b0d3e3dacef7a68fe9dbb
parentbcebf102ccc3c6db327f341adc379fdf0673ca6b
qcow2: Use visitor for options in qcow2_create()

Instead of manually creating the BlockdevCreateOptions object, use a
visitor to parse the given options into the QAPI object.

This involves translation from the old command line syntax to the syntax
mandated by the QAPI schema. Option names are still checked against
qcow2_create_opts, so only the old option names are allowed on the
command line, even if they are translated in qcow2_create().

In contrast, new option values are optionally recognised besides the old
values: 'compat' accepts 'v2'/'v3' as an alias for '0.10'/'1.1', and
'encrypt.format' accepts 'qcow' as an alias for 'aes' now.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/qcow2.c
tests/qemu-iotests/049.out
tests/qemu-iotests/112.out