[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.12 v2 01/12] vdi: Change 'static' create o
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [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)
this.
+ if (!vdi_opts->has_preallocation) {
+ vdi_opts->preallocation = PREALLOC_MODE_OFF;
+ }
+ switch (vdi_opts->preallocation) {
+ case PREALLOC_MODE_OFF:
+ image_type = VDI_TYPE_DYNAMIC;
+ break;
+ case PREALLOC_MODE_METADATA:
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
- [Qemu-devel] [PATCH for-2.12 v2 00/12] block: Follow-up for .bdrv_co_create (part 1), Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 02/12] vdi: Fix build with CONFIG_VDI_DEBUG, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 01/12] vdi: Change 'static' create option to 'preallocation' in QMP, Kevin Wolf, 2018/03/21
- Re: [Qemu-devel] [PATCH for-2.12 v2 01/12] vdi: Change 'static' create option to 'preallocation' in QMP,
Eric Blake <=
- [Qemu-devel] [PATCH for-2.12 v2 04/12] qemu-iotests: Enable 025 for luks, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 05/12] luks: Turn another invalid assertion into check, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 03/12] qemu-iotests: Test vdi image creation with QMP, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 06/12] qemu-iotests: Test invalid resize on luks, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 07/12] parallels: Check maximum cluster size on create, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 09/12] vhdx: Require power-of-two block size on create, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 10/12] vhdx: Don't use error_setg_errno() with constant errno, Kevin Wolf, 2018/03/21
- [Qemu-devel] [PATCH for-2.12 v2 08/12] qemu-iotests: Test parallels image creation with QMP, Kevin Wolf, 2018/03/21