On 03/20/2018 12:36 PM, Kevin Wolf wrote:
What static=on really does is what we call metadata preallocation for other block drivers. While we can still change the QMP interface, make it more consistent by using 'preallocation' for VDI, too.
The x- naming of the command means we don't HAVE to get this patch in for 2.12, but I agree that sooner is better than later and that doing this in 2.12 is worth the effort.
This doesn't implement any new functionality, so the only supported preallocation modes are 'off' and 'metadata' for now. Signed-off-by: Kevin Wolf <kw...@redhat.com> --- qapi/block-core.json | 6 ++---- block/vdi.c | 24 ++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-)
+++ b/qapi/block-core.json @@ -3834,16 +3834,14 @@ # # @file Node to create the image format on # @size Size of the virtual disk in bytes -# @static Whether to create a statically (true) or -# dynamically (false) allocated image -# (default: false, i.e. dynamic) +# @preallocation Preallocation mode for the new image (default: off)
Do we want to document that 'full' is not supported yet? Or is just relying on the error message good enough?
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org