#
# @node-name: The node name of the device. (Since 2.3)
#
+# @qdev: The qdev ID, or if no ID is assigned, the QOM path of the block
+# device. (since 3.0)
+#
# @stats: A @BlockDeviceStats for the device.
#
# @parent: This describes the file block device if it has one.
# Since: 0.14.0
##
{ 'struct': 'BlockStats',
- 'data': {'*device': 'str', '*node-name': 'str',
+ 'data': {'*device': 'str', '*qdev': 'str', '*node-name': 'str',
'stats': 'BlockDeviceStats',
'*parent': 'BlockStats',
'*backing': 'BlockStats'} }
# "idle_time_ns":2953431879,
# "account_invalid":true,
# "account_failed":false
-# }
+# },
+# "qdev": "/machine/unattached/device[23]"
# },
# {
# "device":"ide1-cd0",
# "wr_merged":0,
# "account_invalid":false,
# "account_failed":false
-# }
+# },
+# "qdev": "/machine/unattached/device[24]"
# },
# {
# "device":"floppy0",
# "wr_merged":0,
# "account_invalid":false,
# "account_failed":false
-# }
+# },
+# "qdev": "/machine/unattached/device[16]"
# },
# {
# "device":"sd0",
# a different block device than @device).
#
# @auto-finalize: When false, this job will wait in a PENDING state after it has
-# finished its work, waiting for @block-job-finalize.
-# When true, this job will automatically perform its abort or
-# commit actions.
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
# Defaults to true. (Since 2.12)
#
# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
-# has completed ceased all work, and wait for @block-job-dismiss.
+# has completely ceased all work, and awaits @block-job-dismiss.
# When true, this job will automatically disappear from the query
# list without user intervention.
# Defaults to true. (Since 2.12)
# @speed: the maximum speed, in bytes per second. The default is 0,
# for unlimited.
#
+# @bitmap: the name of dirty bitmap if sync is "incremental".
+# Must be present if sync is "incremental", must NOT be present
+# otherwise. (Since 3.1)
+#
# @compress: true to compress data, if the target format supports it.
# (default: false) (since 2.8)
#
# a different block device than @device).
#
# @auto-finalize: When false, this job will wait in a PENDING state after it has
-# finished its work, waiting for @block-job-finalize.
-# When true, this job will automatically perform its abort or
-# commit actions.
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
# Defaults to true. (Since 2.12)
#
# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
-# has completed ceased all work, and wait for @block-job-dismiss.
+# has completely ceased all work, and awaits @block-job-dismiss.
# When true, this job will automatically disappear from the query
# list without user intervention.
# Defaults to true. (Since 2.12)
##
{ 'struct': 'BlockdevBackup',
'data': { '*job-id': 'str', 'device': 'str', 'target': 'str',
- 'sync': 'MirrorSyncMode', '*speed': 'int', '*compress': 'bool',
+ 'sync': 'MirrorSyncMode', '*speed': 'int',
+ '*bitmap': 'str', '*compress': 'bool',
'*on-source-error': 'BlockdevOnError',
'*on-target-error': 'BlockdevOnError',
'*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
#
# @device: the device name or node-name of a root node
#
-# @base: The file name of the backing image to write data into.
-# If not specified, this is the deepest backing image.
+# @base-node: The node name of the backing image to write data into.
+# If not specified, this is the deepest backing image.
+# (since: 3.1)
+#
+# @base: Same as @base-node, except that it is a file name rather than a node
+# name. This must be the exact filename string that was used to open the
+# node; other strings, even if addressing the same file, are not
+# accepted (deprecated, use @base-node instead)
+#
+# @top-node: The node name of the backing image within the image chain
+# which contains the topmost data to be committed down. If
+# not specified, this is the active layer. (since: 3.1)
#
-# @top: The file name of the backing image within the image chain,
-# which contains the topmost data to be committed down. If
-# not specified, this is the active layer.
+# @top: Same as @top-node, except that it is a file name rather than a node
+# name. This must be the exact filename string that was used to open the
+# node; other strings, even if addressing the same file, are not
+# accepted (deprecated, use @base-node instead)
#
# @backing-file: The backing file string to write into the overlay
# image of 'top'. If 'top' is the active layer,
# above @top. If this option is not given, a node name is
# autogenerated. (Since: 2.9)
#
+# @auto-finalize: When false, this job will wait in a PENDING state after it has
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
+# Defaults to true. (Since 3.1)
+#
+# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
+# has completely ceased all work, and awaits @block-job-dismiss.
+# When true, this job will automatically disappear from the query
+# list without user intervention.
+# Defaults to true. (Since 3.1)
+#
# Returns: Nothing on success
-# If commit or stream is already active on this device, DeviceInUse
# If @device does not exist, DeviceNotFound
-# If image commit is not supported by this device, NotSupported
-# If @base or @top is invalid, a generic error is returned
-# If @speed is invalid, InvalidParameter
+# Any other error returns a GenericError.
#
# Since: 1.3
#
#
##
{ 'command': 'block-commit',
- 'data': { '*job-id': 'str', 'device': 'str', '*base': 'str', '*top': 'str',
+ 'data': { '*job-id': 'str', 'device': 'str', '*base-node': 'str',
+ '*base': 'str', '*top-node': 'str', '*top': 'str',
'*backing-file': 'str', '*speed': 'int',
- '*filter-node-name': 'str' } }
+ '*filter-node-name': 'str',
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
##
# @drive-backup:
# @copy-mode: when to copy data to the destination; defaults to 'background'
# (Since: 3.0)
#
+# @auto-finalize: When false, this job will wait in a PENDING state after it has
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
+# Defaults to true. (Since 3.1)
+#
+# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
+# has completely ceased all work, and awaits @block-job-dismiss.
+# When true, this job will automatically disappear from the query
+# list without user intervention.
+# Defaults to true. (Since 3.1)
# Since: 1.3
##
{ 'struct': 'DriveMirror',
'*speed': 'int', '*granularity': 'uint32',
'*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
'*on-target-error': 'BlockdevOnError',
- '*unmap': 'bool', '*copy-mode': 'MirrorCopyMode' } }
+ '*unmap': 'bool', '*copy-mode': 'MirrorCopyMode',
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
##
# @BlockDirtyBitmap:
##
# @x-block-dirty-bitmap-merge:
#
+# FIXME: Rename @src_name and @dst_name to src-name and dst-name.
+#
# Merge @src_name dirty bitmap to @dst_name dirty bitmap. @src_name dirty
# bitmap is unchanged. On error, @dst_name is unchanged.
#
# @copy-mode: when to copy data to the destination; defaults to 'background'
# (Since: 3.0)
#
+# @auto-finalize: When false, this job will wait in a PENDING state after it has
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
+# Defaults to true. (Since 3.1)
+#
+# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
+# has completely ceased all work, and awaits @block-job-dismiss.
+# When true, this job will automatically disappear from the query
+# list without user intervention.
+# Defaults to true. (Since 3.1)
# Returns: nothing on success.
#
# Since: 2.6
'*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
'*on-target-error': 'BlockdevOnError',
'*filter-node-name': 'str',
- '*copy-mode': 'MirrorCopyMode' } }
+ '*copy-mode': 'MirrorCopyMode',
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
##
# @block_set_io_throttle:
# 'stop' and 'enospc' can only be used if the block device
# supports io-status (see BlockInfo). Since 1.3.
#
+# @auto-finalize: When false, this job will wait in a PENDING state after it has
+# finished its work, waiting for @block-job-finalize before
+# making any block graph changes.
+# When true, this job will automatically
+# perform its abort or commit actions.
+# Defaults to true. (Since 3.1)
+#
+# @auto-dismiss: When false, this job will wait in a CONCLUDED state after it
+# has completely ceased all work, and awaits @block-job-dismiss.
+# When true, this job will automatically disappear from the query
+# list without user intervention.
+# Defaults to true. (Since 3.1)
+#
# Returns: Nothing on success. If @device does not exist, DeviceNotFound.
#
# Since: 1.1
{ 'command': 'block-stream',
'data': { '*job-id': 'str', 'device': 'str', '*base': 'str',
'*base-node': 'str', '*backing-file': 'str', '*speed': 'int',
- '*on-error': 'BlockdevOnError' } }
+ '*on-error': 'BlockdevOnError',
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
##
# @block-job-set-speed:
# @throttle: Since 2.11
# @nvme: Since 2.12
# @copy-on-read: Since 3.0
+# @blklogwrites: Since 3.0
#
# Since: 2.9
##
{ 'enum': 'BlockdevDriver',
- 'data': [ 'blkdebug', 'blkverify', 'bochs', 'cloop', 'copy-on-read',
- 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom',
- 'host_device', 'http', 'https', 'iscsi', 'luks', 'nbd', 'nfs',
- 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow', 'qcow2', 'qed',
- 'quorum', 'raw', 'rbd', 'replication', 'sheepdog', 'ssh',
- 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
+ 'data': [ 'blkdebug', 'blklogwrites', 'blkverify', 'bochs', 'cloop',
+ 'copy-on-read', 'dmg', 'file', 'ftp', 'ftps', 'gluster',
+ 'host_cdrom', 'host_device', 'http', 'https', 'iscsi', 'luks',
+ 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow',
+ 'qcow2', 'qed', 'quorum', 'raw', 'rbd', 'replication', 'sheepdog',
+ 'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] }
##
# @BlockdevOptionsFile:
# @template: Specifies a template mode which can be adjusted using the other
# flags, defaults to 'cached'
#
+# @bitmap-directory: since 3.0
+#
# Since: 2.9
##
{ 'struct': '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' } }
+ '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',
+ '*bitmap-directory': 'bool' } }
##
# @Qcow2OverlapChecks:
#
# @cache-clean-interval: clean unused entries in the L2 and refcount
# caches. The interval is in seconds. The default value
-# is 0 and it disables this feature (since 2.5)
+# is 600 on supporting platforms, and 0 on other
+# platforms. 0 disables this feature. (since 2.5)
+#
# @encrypt: Image decryption options. Mandatory for
# encrypted images, except when doing a metadata-only
# probe of the image. (since 2.10)
'*inject-error': ['BlkdebugInjectErrorOptions'],
'*set-state': ['BlkdebugSetStateOptions'] } }
+##
+# @BlockdevOptionsBlklogwrites:
+#
+# Driver specific block device options for blklogwrites.
+#
+# @file: block device
+#
+# @log: block device used to log writes to @file
+#
+# @log-sector-size: sector size used in logging writes to @file, determines
+# granularity of offsets and sizes of writes (default: 512)
+#
+# @log-append: append to an existing log (default: false)
+#
+# @log-super-update-interval: interval of write requests after which the log
+# super block is updated to disk (default: 4096)
+#
+# Since: 3.0
+##
+{ 'struct': 'BlockdevOptionsBlklogwrites',
+ 'data': { 'file': 'BlockdevRef',
+ 'log': 'BlockdevRef',
+ '*log-sector-size': 'uint32',
+ '*log-append': 'bool',
+ '*log-super-update-interval': 'uint64' } }
+
##
# @BlockdevOptionsBlkverify:
#
# @driver: block driver name
# @node-name: the node name of the new node (Since 2.0).
# This option is required on the top level of blockdev-add.
+# Valid node names start with an alphabetic character and may
+# contain only alphanumeric characters, '-', '.' and '_'. Their
+# maximum length is 31 characters.
# @discard: discard-related options (default: ignore)
# @cache: cache-related options
# @read-only: whether the block device should be read-only (default: false).
# either generally or in certain configurations. In this case,
# the default value does not work and the option must be
# specified explicitly.
+# @auto-read-only: if true and @read-only is false, QEMU may automatically
+# decide not to open the image read-write as requested, but
+# fall back to read-only instead (and switch between the modes
+# later), e.g. depending on whether the image file is writable
+# or whether a writing user is attached to the node
+# (default: false, since 3.1)
# @detect-zeroes: detect and optimize zero writes (Since 2.1)
# (default: off)
# @force-share: force share all permission on added nodes.
'*discard': 'BlockdevDiscardOptions',
'*cache': 'BlockdevCacheOptions',
'*read-only': 'bool',
+ '*auto-read-only': 'bool',
'*force-share': 'bool',
'*detect-zeroes': 'BlockdevDetectZeroesOptions' },
'discriminator': 'driver',
'data': {
'blkdebug': 'BlockdevOptionsBlkdebug',
+ 'blklogwrites':'BlockdevOptionsBlklogwrites',
'blkverify': 'BlockdevOptionsBlkverify',
'bochs': 'BlockdevOptionsGenericFormat',
'cloop': 'BlockdevOptionsGenericFormat',