#
# @filename: Name of the extent file
#
-# @format: Extent type (e.g. FLAT or SPARSE)
+# @format: Extent type (e.g. FLAT or SPARSE)
#
# @virtual-size: Number of bytes covered by this extent
#
#
# @zero: whether the virtual blocks read as zeroes
#
+# @compressed: true if the data is stored compressed (since 8.2)
+#
# @depth: number of layers (0 = top image, 1 = top image's backing
# file, ..., n - 1 = bottom image (where n is the number of images
# in the chain)) before reaching one for which the range is
##
{ 'struct': 'MapEntry',
'data': {'start': 'int', 'length': 'int', 'data': 'bool',
- 'zero': 'bool', 'depth': 'int', 'present': 'bool',
- '*offset': 'int', '*filename': 'str' } }
+ 'zero': 'bool', 'compressed': 'bool', 'depth': 'int',
+ 'present': 'bool', '*offset': 'int', '*filename': 'str' } }
##
# @BlockdevCacheInfo:
# 10), [10, 50), [50, 100), [100, +inf).
#
# @bins: list of io request counts corresponding to histogram
-# intervals.
-# len(@bins) = len(@boundaries) + 1
-# For the example above, @bins may be something like [3, 1, 5, 2],
-# and corresponding histogram looks like:
+# intervals, one more element than @boundaries has. For the
+# example above, @bins may be something like [3, 1, 5, 2], and
+# corresponding histogram looks like:
#
# ::
#
# @min_wr_latency_ns: Minimum latency of write operations in the
# defined interval, in nanoseconds.
#
+# @min_zone_append_latency_ns: Minimum latency of zone append
+# operations in the defined interval, in nanoseconds (since 8.1)
+#
# @min_flush_latency_ns: Minimum latency of flush operations in the
# defined interval, in nanoseconds.
#
# @max_wr_latency_ns: Maximum latency of write operations in the
# defined interval, in nanoseconds.
#
+# @max_zone_append_latency_ns: Maximum latency of zone append
+# operations in the defined interval, in nanoseconds (since 8.1)
+#
# @max_flush_latency_ns: Maximum latency of flush operations in the
# defined interval, in nanoseconds.
#
# @avg_wr_latency_ns: Average latency of write operations in the
# defined interval, in nanoseconds.
#
+# @avg_zone_append_latency_ns: Average latency of zone append
+# operations in the defined interval, in nanoseconds (since 8.1)
+#
# @avg_flush_latency_ns: Average latency of flush operations in the
# defined interval, in nanoseconds.
#
# @avg_wr_queue_depth: Average number of pending write operations in
# the defined interval.
#
+# @avg_zone_append_queue_depth: Average number of pending zone append
+# operations in the defined interval (since 8.1).
+#
# Since: 2.5
##
{ 'struct': 'BlockDeviceTimedStats',
'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int',
'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int',
'min_wr_latency_ns': 'int', 'max_wr_latency_ns': 'int',
- 'avg_wr_latency_ns': 'int', 'min_flush_latency_ns': 'int',
- 'max_flush_latency_ns': 'int', 'avg_flush_latency_ns': 'int',
- 'avg_rd_queue_depth': 'number', 'avg_wr_queue_depth': 'number' } }
+ 'avg_wr_latency_ns': 'int', 'min_zone_append_latency_ns': 'int',
+ 'max_zone_append_latency_ns': 'int',
+ 'avg_zone_append_latency_ns': 'int',
+ 'min_flush_latency_ns': 'int', 'max_flush_latency_ns': 'int',
+ 'avg_flush_latency_ns': 'int', 'avg_rd_queue_depth': 'number',
+ 'avg_wr_queue_depth': 'number',
+ 'avg_zone_append_queue_depth': 'number' } }
##
# @BlockDeviceStats:
#
# @wr_bytes: The number of bytes written by the device.
#
+# @zone_append_bytes: The number of bytes appended by the zoned
+# devices (since 8.1)
+#
# @unmap_bytes: The number of bytes unmapped by the device (Since 4.2)
#
# @rd_operations: The number of read operations performed by the
# @wr_operations: The number of write operations performed by the
# device.
#
+# @zone_append_operations: The number of zone append operations
+# performed by the zoned devices (since 8.1)
+#
# @flush_operations: The number of cache flush operations performed by
# the device (since 0.15)
#
# @wr_total_time_ns: Total time spent on writes in nanoseconds (since
# 0.15).
#
+# @zone_append_total_time_ns: Total time spent on zone append writes
+# in nanoseconds (since 8.1)
+#
# @flush_total_time_ns: Total time spent on cache flushes in
# nanoseconds (since 0.15).
#
# @wr_merged: Number of write requests that have been merged into
# another request (Since 2.3).
#
+# @zone_append_merged: Number of zone append requests that have been
+# merged into another request (since 8.1)
+#
# @unmap_merged: Number of unmap requests that have been merged into
# another request (Since 4.2)
#
# @failed_wr_operations: The number of failed write operations
# performed by the device (Since 2.5)
#
+# @failed_zone_append_operations: The number of failed zone append
+# write operations performed by the zoned devices (since 8.1)
+#
# @failed_flush_operations: The number of failed flush operations
# performed by the device (Since 2.5)
#
# @invalid_wr_operations: The number of invalid write operations
# performed by the device (Since 2.5)
#
+# @invalid_zone_append_operations: The number of invalid zone append
+# operations performed by the zoned device (since 8.1)
+#
# @invalid_flush_operations: The number of invalid flush operations
# performed by the device (Since 2.5)
#
#
# @wr_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0)
#
+# @zone_append_latency_histogram: @BlockLatencyHistogramInfo.
+# (since 8.1)
+#
# @flush_latency_histogram: @BlockLatencyHistogramInfo. (Since 4.0)
#
# Since: 0.14
##
{ 'struct': 'BlockDeviceStats',
- 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'unmap_bytes' : 'int',
- 'rd_operations': 'int', 'wr_operations': 'int',
+ 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'zone_append_bytes': 'int',
+ 'unmap_bytes' : 'int', 'rd_operations': 'int',
+ 'wr_operations': 'int', 'zone_append_operations': 'int',
'flush_operations': 'int', 'unmap_operations': 'int',
'rd_total_time_ns': 'int', 'wr_total_time_ns': 'int',
- 'flush_total_time_ns': 'int', 'unmap_total_time_ns': 'int',
- 'wr_highest_offset': 'int',
- 'rd_merged': 'int', 'wr_merged': 'int', 'unmap_merged': 'int',
- '*idle_time_ns': 'int',
+ 'zone_append_total_time_ns': 'int', 'flush_total_time_ns': 'int',
+ 'unmap_total_time_ns': 'int', 'wr_highest_offset': 'int',
+ 'rd_merged': 'int', 'wr_merged': 'int', 'zone_append_merged': 'int',
+ 'unmap_merged': 'int', '*idle_time_ns': 'int',
'failed_rd_operations': 'int', 'failed_wr_operations': 'int',
- 'failed_flush_operations': 'int', 'failed_unmap_operations': 'int',
- 'invalid_rd_operations': 'int', 'invalid_wr_operations': 'int',
+ 'failed_zone_append_operations': 'int',
+ 'failed_flush_operations': 'int',
+ 'failed_unmap_operations': 'int', 'invalid_rd_operations': 'int',
+ 'invalid_wr_operations': 'int',
+ 'invalid_zone_append_operations': 'int',
'invalid_flush_operations': 'int', 'invalid_unmap_operations': 'int',
'account_invalid': 'bool', 'account_failed': 'bool',
'timed_stats': ['BlockDeviceTimedStats'],
'*rd_latency_histogram': 'BlockLatencyHistogramInfo',
'*wr_latency_histogram': 'BlockLatencyHistogramInfo',
+ '*zone_append_latency_histogram': 'BlockLatencyHistogramInfo',
'*flush_latency_histogram': 'BlockLatencyHistogramInfo' } }
##
#
# @parent: This describes the file block device if it has one.
# Contains recursively the statistics of the underlying protocol
-# (e.g. the host file for a qcow2 image). If there is no
+# (e.g. the host file for a qcow2 image). If there is no
# underlying protocol, this field is omitted
#
# @backing: This describes the backing block device if it has one.
'data': ['background', 'write-blocking'] }
##
+# @BlockJobInfoMirror:
+#
+# Information specific to mirror block jobs.
+#
+# @actively-synced: Whether the source is actively synced to the
+# target, i.e. same data and new writes are done synchronously to
+# both.
+#
+# Since 8.2
+##
+{ 'struct': 'BlockJobInfoMirror',
+ 'data': { 'actively-synced': 'bool' } }
+
+##
# @BlockJobInfo:
#
# Information about a long-running block device operation.
#
# Since: 1.1
##
-{ 'struct': 'BlockJobInfo',
- 'data': {'type': 'str', 'device': 'str', 'len': 'int',
+{ 'union': 'BlockJobInfo',
+ 'base': {'type': 'JobType', 'device': 'str', 'len': 'int',
'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
'io-status': 'BlockDeviceIoStatus', 'ready': 'bool',
'status': 'JobStatus',
'auto-finalize': 'bool', 'auto-dismiss': 'bool',
- '*error': 'str' } }
+ '*error': 'str' },
+ 'discriminator': 'type',
+ 'data': { 'mirror': 'BlockJobInfoMirror' } }
##
# @query-block-jobs:
# @format: the format of the overlay image, default is 'qcow2'.
#
# @mode: whether and how QEMU should create a new image, default is
-# 'absolute-paths'.
+# 'absolute-paths'.
##
{ 'struct': 'BlockdevSnapshotSync',
'data': { '*device': 'str', '*node-name': 'str',
#
# @bitmap: The name of a dirty bitmap to use. Must be present if sync
# is "bitmap" or "incremental". Can be present if sync is "full"
-# or "top". Must not be present otherwise.
+# or "top". Must not be present otherwise.
# (Since 2.4 (drive-backup), 3.1 (blockdev-backup))
#
# @bitmap-mode: Specifies the type of data the bitmap should contain
'allow-preconfig': true }
##
+# @BlockJobChangeOptionsMirror:
+#
+# @copy-mode: Switch to this copy mode. Currently, only the switch
+# from 'background' to 'write-blocking' is implemented.
+#
+# Since: 8.2
+##
+{ 'struct': 'BlockJobChangeOptionsMirror',
+ 'data': { 'copy-mode' : 'MirrorCopyMode' } }
+
+##
+# @BlockJobChangeOptions:
+#
+# Block job options that can be changed after job creation.
+#
+# @id: The job identifier
+#
+# @type: The job type
+#
+# Since 8.2
+##
+{ 'union': 'BlockJobChangeOptions',
+ 'base': { 'id': 'str', 'type': 'JobType' },
+ 'discriminator': 'type',
+ 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } }
+
+##
+# @block-job-change:
+#
+# Change the block job's options.
+#
+# Since: 8.2
+##
+{ 'command': 'block-job-change',
+ 'data': 'BlockJobChangeOptions', 'boxed': true }
+
+##
# @BlockdevDiscardOptions:
#
# Determines how to handle discard requests.
# @pass-discard-other: whether discard requests for the data source
# should be issued on other occasions where a cluster gets freed
#
+# @discard-no-unref: when enabled, data clusters will remain
+# preallocated when they are no longer used, e.g. because they are
+# discarded or converted to zero clusters. As usual, whether the
+# old data is discarded or kept on the protocol level (i.e. in the
+# image file) depends on the setting of the pass-discard-request
+# option. Keeping the clusters preallocated prevents qcow2
+# fragmentation that would otherwise be caused by freeing and
+# re-allocating them later. Besides potential performance
+# degradation, such fragmentation can lead to increased allocation
+# of clusters past the end of the image file, resulting in image
+# files whose file length can grow much larger than their guest disk
+# size would suggest. If image file length is of concern (e.g. when
+# storing qcow2 images directly on block devices), you should
+# consider enabling this option. (since 8.1)
+#
# @overlap-check: which overlap checks to perform for writes to the
# image, defaults to 'cached' (since 2.2)
#
'*pass-discard-request': 'bool',
'*pass-discard-snapshot': 'bool',
'*pass-discard-other': 'bool',
+ '*discard-no-unref': 'bool',
'*overlap-check': 'Qcow2OverlapChecks',
'*cache-size': 'int',
'*l2-cache-size': 'int',
#
# @path: path to the vhost-vdpa character device.
#
+# Features:
+# @fdset: Member @path supports the special "/dev/fdset/N" path
+# (since 8.1)
+#
# Since: 7.2
##
{ 'struct': 'BlockdevOptionsVirtioBlkVhostVdpa',
'data': { 'path': 'str' },
+ 'features': [ { 'name' :'fdset',
+ 'if': 'CONFIG_BLKIO_VHOST_VDPA_FD' } ],
'if': 'CONFIG_BLKIO' }
##
#
# @subformat: vhdx subformat (default: dynamic)
#
-# @block-state-zero: Force use of payload blocks of type
-# 'ZERO'. Non-standard, but default. Do not set to 'off' when
-# using 'qemu-img convert' with subformat=dynamic.
+# @block-state-zero: Force use of payload blocks of type 'ZERO'.
+# Non-standard, but default. Do not set to 'off' when using
+# 'qemu-img convert' with subformat=dynamic.
#
# Since: 2.12
##