[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 41/59] qapi/block-core: Add "new" qcow2 options
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 41/59] qapi/block-core: Add "new" qcow2 options |
Date: |
Fri, 19 Sep 2014 15:42:00 +0100 |
From: Max Reitz <address@hidden>
qcow2 supports more than four options by now, add the new options
(overlap check mode and metadata cache size)
Signed-off-by: Max Reitz <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
qapi/block-core.json | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 78 insertions(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index ef7faaa..85dc87d 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1264,6 +1264,67 @@
'data': { '*backing': 'BlockdevRef' } }
##
+# @Qcow2OverlapCheckMode
+#
+# General overlap check modes.
+#
+# @none: Do not perform any checks
+#
+# @constant: Perform only checks which can be done in constant time and
+# without reading anything from disk
+#
+# @cached: Perform only checks which can be done without reading anything
+# from disk
+#
+# @all: Perform all available overlap checks
+#
+# Since: 2.2
+##
+{ 'enum': 'Qcow2OverlapCheckMode',
+ 'data': [ 'none', 'constant', 'cached', 'all' ] }
+
+##
+# @Qcow2OverlapCheckFlags
+#
+# Structure of flags for each metadata structure. Setting a field to 'true'
+# makes qemu guard that structure against unintended overwriting. The default
+# value is chosen according to the template given.
+#
+# @template: Specifies a template mode which can be adjusted using the other
+# flags, defaults to 'cached'
+#
+# Since: 2.2
+##
+{ 'type': 'Qcow2OverlapCheckFlags',
+ 'data': { '*template': 'Qcow2OverlapCheckMode',
+ '*main-header': 'bool',
+ '*active-l1': 'bool',
+ '*active-l2': 'bool',
+ '*refcount-table': 'bool',
+ '*refcount-block': 'bool',
+ '*snapshot-table': 'bool',
+ '*inactive-l1': 'bool',
+ '*inactive-l2': 'bool' } }
+
+##
+# @Qcow2OverlapChecks
+#
+# Specifies which metadata structures should be guarded against unintended
+# overwriting.
+#
+# @flags: set of flags for separate specification of each metadata structure
+# type
+#
+# @mode: named mode which chooses a specific set of flags
+#
+# Since: 2.2
+##
+{ 'union': 'Qcow2OverlapChecks',
+ 'discriminator': {},
+ 'data': { 'flags': 'Qcow2OverlapCheckFlags',
+ 'mode': 'Qcow2OverlapCheckMode' } }
+
+##
# @BlockdevOptionsQcow2
#
# Driver specific block device options for qcow2.
@@ -1282,6 +1343,18 @@
# should be issued on other occasions where a cluster
# gets freed
#
+# @overlap-check: #optional which overlap checks to perform for writes
+# to the image, defaults to 'cached' (since 2.2)
+#
+# @cache-size: #optional the maximum total size of the L2 table and
+# refcount block caches in bytes (since 2.2)
+#
+# @l2-cache-size: #optional the maximum size of the L2 table cache in
+# bytes (since 2.2)
+#
+# @refcount-cache-size: #optional the maximum size of the refcount block
cache
+# in bytes (since 2.2)
+#
# Since: 1.7
##
{ 'type': 'BlockdevOptionsQcow2',
@@ -1289,7 +1362,11 @@
'data': { '*lazy-refcounts': 'bool',
'*pass-discard-request': 'bool',
'*pass-discard-snapshot': 'bool',
- '*pass-discard-other': 'bool' } }
+ '*pass-discard-other': 'bool',
+ '*overlap-check': 'Qcow2OverlapChecks',
+ '*cache-size': 'int',
+ '*l2-cache-size': 'int',
+ '*refcount-cache-size': 'int' } }
##
--
1.9.3
- [Qemu-devel] [PULL 50/59] ahci: Add test_hba_spec to ahci-test., (continued)
- [Qemu-devel] [PULL 50/59] ahci: Add test_hba_spec to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 51/59] ahci: Add test_hba_enable to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 52/59] ahci: Add test_identify case to ahci-test., Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 54/59] block: delete cow block driver, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 55/59] block: vhdx - fix reading beyond pointer during image creation, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 56/59] async: aio_context_new(): Handle event_notifier_init failure, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 57/59] virtio: Import virtio_vring.h, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 53/59] block/archipelago: Fix typo in qemu_archipelago_truncate(), Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 58/59] vring: Better error handling if num is too large, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 59/59] block: Always compile virtio-blk dataplane, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 41/59] qapi/block-core: Add "new" qcow2 options,
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 40/59] qcow2: Add overlap-check.template option, Stefan Hajnoczi, 2014/09/19
- [Qemu-devel] [PULL 42/59] docs: List all image elements currently supported by the fuzzer, Stefan Hajnoczi, 2014/09/19
- Re: [Qemu-devel] [PULL 00/59] Block patches, Peter Maydell, 2014/09/19