aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-06-14 14:46:13 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-06-14 14:46:13 +0100
commitf3d0bec9f80e4ed7796fffa834ba0a53f2094f7f (patch)
tree94b53ffb785bd696cf62e350dd44b0005c801e8a /qapi
parent5ec2eca83dc478ddf24077e02a8b34dd26cd3ff9 (diff)
parent21c1ce592a144188dfe59b9e156a97da412a59a2 (diff)
downloadqemu-f3d0bec9f80e4ed7796fffa834ba0a53f2094f7f.zip
qemu-f3d0bec9f80e4ed7796fffa834ba0a53f2094f7f.tar.gz
qemu-f3d0bec9f80e4ed7796fffa834ba0a53f2094f7f.tar.bz2
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-06-14' into staging
Block patches: - Allow blockdev-backup from nodes that are not in qemu's main AIO context to newly added nodes - Add salvaging mode to qemu-img convert - Minor fixes to tests, documentation, and for less Valgrind annoyance # gpg: Signature made Fri 14 Jun 2019 14:38:11 BST # gpg: using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40 # gpg: issuer "mreitz@redhat.com" # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full] # Primary key fingerprint: 91BE B60A 30DB 3E88 57D1 1829 F407 DB00 61D5 CF40 * remotes/maxreitz/tags/pull-block-2019-06-14: iotests: Test qemu-img convert -C --salvage iotests: Test qemu-img convert --salvage blkdebug: Inject errors on .bdrv_co_block_status() blkdebug: Add "none" event blkdebug: Add @iotype error option qemu-img: Add salvaging mode to convert qemu-img: Move quiet into ImgConvertState blockdev: Overlays are not snapshots qapi/block-core: Overlays are not snapshots qemu-img: Fix options leakage in img_rebase() iotests: restrict 254 to support only qcow2 hw/block/fdc: floppy command FIFO memory initialization iotests: Fix intermittent failure in 219 iotests: Filter 175's allocation information event_match: always match on None value iotests: add iotest 256 for testing blockdev-backup across iothread contexts iotests.py: rewrite run_job to be pickier QEMUMachine: add events_wait method iotests.py: do not use infinite waits blockdev-backup: don't check aio_context too early Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json53
1 files changed, 42 insertions, 11 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index fcd054f..6112443 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1279,17 +1279,17 @@
#
# Either @device or @node-name must be set but not both.
#
-# @device: the name of the device to generate the snapshot from.
+# @device: the name of the device to take a snapshot of.
#
# @node-name: graph node name to generate the snapshot from (Since 2.0)
#
-# @snapshot-file: the target of the new image. If the file exists, or
-# if it is a device, the snapshot will be created in the existing
-# file/device. Otherwise, a new file will be created.
+# @snapshot-file: the target of the new overlay image. If the file
+# exists, or if it is a device, the overlay will be created in the
+# existing file/device. Otherwise, a new file will be created.
#
# @snapshot-node-name: the graph node name of the new image (Since 2.0)
#
-# @format: the format of the snapshot image, default is 'qcow2'.
+# @format: the format of the overlay image, default is 'qcow2'.
#
# @mode: whether and how QEMU should create a new image, default is
# 'absolute-paths'.
@@ -1302,10 +1302,10 @@
##
# @BlockdevSnapshot:
#
-# @node: device or node name that will have a snapshot created.
+# @node: device or node name that will have a snapshot taken.
#
# @overlay: reference to the existing block device that will become
-# the overlay of @node, as part of creating the snapshot.
+# the overlay of @node, as part of taking the snapshot.
# It must not have a current backing file (this can be
# achieved by passing "backing": null to blockdev-add).
#
@@ -1443,7 +1443,7 @@
##
# @blockdev-snapshot-sync:
#
-# Generates a synchronous snapshot of a block device.
+# Takes a synchronous snapshot of a block device.
#
# For the arguments, see the documentation of BlockdevSnapshotSync.
#
@@ -1469,9 +1469,9 @@
##
# @blockdev-snapshot:
#
-# Generates a snapshot of a block device.
+# Takes a snapshot of a block device.
#
-# Create a snapshot, by installing 'node' as the backing image of
+# Take a snapshot, by installing 'node' as the backing image of
# 'overlay'. Additionally, if 'node' is associated with a block
# device, the block device changes to using 'overlay' as its new active
# image.
@@ -3244,6 +3244,8 @@
#
# @cluster_alloc_space: an allocation of file space for a cluster (since 4.1)
#
+# @none: triggers once at creation of the blkdebug node (since 4.1)
+#
# Since: 2.9
##
{ 'enum': 'BlkdebugEvent', 'prefix': 'BLKDBG',
@@ -3262,7 +3264,30 @@
'pwritev_rmw_tail', 'pwritev_rmw_after_tail', 'pwritev',
'pwritev_zero', 'pwritev_done', 'empty_image_prepare',
'l1_shrink_write_table', 'l1_shrink_free_l2_clusters',
- 'cor_write', 'cluster_alloc_space'] }
+ 'cor_write', 'cluster_alloc_space', 'none'] }
+
+##
+# @BlkdebugIOType:
+#
+# Kinds of I/O that blkdebug can inject errors in.
+#
+# @read: .bdrv_co_preadv()
+#
+# @write: .bdrv_co_pwritev()
+#
+# @write-zeroes: .bdrv_co_pwrite_zeroes()
+#
+# @discard: .bdrv_co_pdiscard()
+#
+# @flush: .bdrv_co_flush_to_disk()
+#
+# @block-status: .bdrv_co_block_status()
+#
+# Since: 4.1
+##
+{ 'enum': 'BlkdebugIOType', 'prefix': 'BLKDEBUG_IO_TYPE',
+ 'data': [ 'read', 'write', 'write-zeroes', 'discard', 'flush',
+ 'block-status' ] }
##
# @BlkdebugInjectErrorOptions:
@@ -3274,6 +3299,11 @@
# @state: the state identifier blkdebug needs to be in to
# actually trigger the event; defaults to "any"
#
+# @iotype: the type of I/O operations on which this error should
+# be injected; defaults to "all read, write,
+# write-zeroes, discard, and flush operations"
+# (since: 4.1)
+#
# @errno: error identifier (errno) to be returned; defaults to
# EIO
#
@@ -3291,6 +3321,7 @@
{ 'struct': 'BlkdebugInjectErrorOptions',
'data': { 'event': 'BlkdebugEvent',
'*state': 'int',
+ '*iotype': 'BlkdebugIOType',
'*errno': 'int',
'*sector': 'int',
'*once': 'bool',