# @stop: for guest operations, stop the virtual machine;
# for jobs, pause the job
#
+# @auto: inherit the error handling policy of the backend (since: 2.7)
+#
# Since: 1.3
##
{ 'enum': 'BlockdevOnError',
- 'data': ['report', 'ignore', 'enospc', 'stop'] }
+ 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] }
##
# @MirrorSyncMode:
#
# @type: the job type ('stream' for image streaming)
#
-# @device: the block device name
+# @device: The job identifier. Originally the device name but other
+# values are allowed since QEMU 2.7
#
# @len: the maximum progress value
#
# Live commit of data from overlay image nodes into backing nodes - i.e.,
# writes data between 'top' and 'base' into 'base'.
#
+# @job-id: #optional identifier for the newly-created block job. If
+# omitted, the device name will be used. (Since 2.7)
+#
# @device: the name of the device
#
# @base: #optional The file name of the backing image to write data into.
#
##
{ 'command': 'block-commit',
- 'data': { 'device': 'str', '*base': 'str', '*top': 'str',
+ 'data': { '*job-id': 'str', 'device': 'str', '*base': 'str', '*top': 'str',
'*backing-file': 'str', '*speed': 'int' } }
##
# the device will be removed from its group and the rest of its
# members will not be affected. The 'group' parameter is ignored.
#
+# See BlockIOThrottle for parameter descriptions.
+#
+# Returns: Nothing on success
+# If @device is not a valid block device, DeviceNotFound
+#
+# Since: 1.1
+##
+{ 'command': 'block_set_io_throttle', 'boxed': true,
+ 'data': 'BlockIOThrottle' }
+
+##
+# BlockIOThrottle
+#
+# A set of parameters describing block throttling.
+#
# @device: The name of the device
#
# @bps: total throughput limit in bytes per second
#
# @group: #optional throttle group name (Since 2.4)
#
-# Returns: Nothing on success
-# If @device is not a valid block device, DeviceNotFound
-#
# Since: 1.1
##
-{ 'command': 'block_set_io_throttle',
+{ 'struct': 'BlockIOThrottle',
'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
'*bps_max': 'int', '*bps_rd_max': 'int',
# On successful completion the image file is updated to drop the backing file
# and the BLOCK_JOB_COMPLETED event is emitted.
#
+# @job-id: #optional identifier for the newly-created block job. If
+# omitted, the device name will be used. (Since 2.7)
+#
# @device: the device name
#
# @base: #optional the common backing file name
# Since: 1.1
##
{ 'command': 'block-stream',
- 'data': { 'device': 'str', '*base': 'str', '*backing-file': 'str',
- '*speed': 'int', '*on-error': 'BlockdevOnError' } }
+ 'data': { '*job-id': 'str', 'device': 'str', '*base': 'str',
+ '*backing-file': 'str', '*speed': 'int',
+ '*on-error': 'BlockdevOnError' } }
##
# @block-job-set-speed:
#
# Throttling can be disabled by setting the speed to 0.
#
-# @device: the device name
+# @device: The job identifier. This used to be a device name (hence
+# the name of the parameter), but since QEMU 2.7 it can have
+# other values.
#
# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
# Defaults to 0.
# operation can be started at a later time to finish copying all data from the
# backing file.
#
-# @device: the device name
+# @device: The job identifier. This used to be a device name (hence
+# the name of the parameter), but since QEMU 2.7 it can have
+# other values.
#
# @force: #optional whether to allow cancellation of a paused job (default
# false). Since 1.3.
# the operation is actually paused. Cancelling a paused job automatically
# resumes it.
#
-# @device: the device name
+# @device: The job identifier. This used to be a device name (hence
+# the name of the parameter), but since QEMU 2.7 it can have
+# other values.
#
# Returns: Nothing on success
# If no background operation is active on this device, DeviceNotActive
#
# This command also clears the error status of the job.
#
-# @device: the device name
+# @device: The job identifier. This used to be a device name (hence
+# the name of the parameter), but since QEMU 2.7 it can have
+# other values.
#
# Returns: Nothing on success
# If no background operation is active on this device, DeviceNotActive
#
# A cancelled or paused job cannot be completed.
#
-# @device: the device name
+# @device: The job identifier. This used to be a device name (hence
+# the name of the parameter), but since QEMU 2.7 it can have
+# other values.
#
# Returns: Nothing on success
# If no background operation is active on this device, DeviceNotActive
# @discard: #optional discard-related options (default: ignore)
# @cache: #optional cache-related options
# @aio: #optional AIO backend (default: threads)
-# @rerror: #optional how to handle read errors on the device
-# (default: report)
-# @werror: #optional how to handle write errors on the device
-# (default: enospc)
# @read-only: #optional whether the block device should be read-only
# (default: false)
-# @stats-account-invalid: #optional whether to include invalid
-# operations when computing last access statistics
-# (default: true) (Since 2.5)
-# @stats-account-failed: #optional whether to include failed
-# operations when computing latency and last
-# access statistics (default: true) (Since 2.5)
-# @stats-intervals: #optional list of intervals for collecting I/O
-# statistics, in seconds (default: none) (Since 2.5)
# @detect-zeroes: #optional detect and optimize zero writes (Since 2.1)
# (default: off)
#
##
{ 'union': 'BlockdevOptions',
'base': { 'driver': 'BlockdevDriver',
+# TODO 'id' is a BB-level option, remove it
'*id': 'str',
'*node-name': 'str',
'*discard': 'BlockdevDiscardOptions',
'*cache': 'BlockdevCacheOptions',
'*aio': 'BlockdevAioOptions',
- '*rerror': 'BlockdevOnError',
- '*werror': 'BlockdevOnError',
'*read-only': 'bool',
- '*stats-account-invalid': 'bool',
- '*stats-account-failed': 'bool',
- '*stats-intervals': ['int'],
'*detect-zeroes': 'BlockdevDetectZeroesOptions' },
'discriminator': 'driver',
'data': {
#
# @type: job type
#
-# @device: device name
+# @device: The job identifier. Originally the device name but other
+# values are allowed since QEMU 2.7
#
# @len: maximum progress value
#
#
# @type: job type
#
-# @device: device name
+# @device: The job identifier. Originally the device name but other
+# values are allowed since QEMU 2.7
#
# @len: maximum progress value
#
#
# Emitted when a block job encounters an error
#
-# @device: device name
+# @device: The job identifier. Originally the device name but other
+# values are allowed since QEMU 2.7
#
# @operation: I/O operation
#
#
# @type: job type
#
-# @device: device name
+# @device: The job identifier. Originally the device name but other
+# values are allowed since QEMU 2.7
#
# @len: maximum progress value
#