[Top][All Lists]

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

Re: [Qemu-block] [PATCH for-2.12 v2 01/12] vdi: Change 'static' create o

From: Eric Blake
Subject: Re: [Qemu-block] [PATCH for-2.12 v2 01/12] vdi: Change 'static' create option to 'preallocation' in QMP
Date: Wed, 21 Mar 2018 12:41:38 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 03/21/2018 12:37 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.

This doesn't implement any new functionality, so the only supported
preallocation modes are 'off' and 'metadata' for now.

Disagrees with:

Signed-off-by: Kevin Wolf <address@hidden>
  qapi/block-core.json |  7 +++----
  block/vdi.c          | 24 ++++++++++++++++++++++--
  2 files changed, 25 insertions(+), 6 deletions(-)

+# @preallocation    Preallocation mode for the new image (allowed values: off,
+#                   full; default: off)


+    if (!vdi_opts->has_preallocation) {
+        vdi_opts->preallocation = PREALLOC_MODE_OFF;
+    }
+    switch (vdi_opts->preallocation) {
+        image_type = VDI_TYPE_DYNAMIC;
+        break;
          image_type = VDI_TYPE_STATIC;
+        break;
+    default:
+        error_setg(errp, "Preallocation mode not supported for vdi");

but matches this. Fix your QMP documentation with s/full/metadata/ and you can have:

Reviewed-by: Eric Blake <address@hidden>

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

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