From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 36/93] qapi: QMP interface for blkdebug and blkverify
Date: Fri, 24 Jan 2014 18:21:19 +0100 [thread overview]
Message-ID: <1390584136-24703-37-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1390584136-24703-1-git-send-email-kwolf@redhat.com>
From: Max Reitz <mreitz@redhat.com>
Add structures to support blkdebug and blkverify in blockdev-add.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
qapi-schema.json | 113 +++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 109 insertions(+), 4 deletions(-)
diff --git a/qapi-schema.json b/qapi-schema.json
index f27c48a..35f7b34 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -4201,6 +4201,113 @@
'*pass-discard-other': 'bool' } }
##
+# @BlkdebugEvent
+#
+# Trigger events supported by blkdebug.
+##
+{ 'enum': 'BlkdebugEvent',
+ 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
+ 'l1_grow.activate_table', 'l2_load', 'l2_update',
+ 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
+ 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
+ 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
+ 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
+ 'refblock_load', 'refblock_update', 'refblock_update_part',
+ 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
+ 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
+ 'refblock_alloc.switch_table', 'cluster_alloc',
+ 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
+ 'flush_to_disk' ] }
+
+##
+# @BlkdebugInjectErrorOptions
+#
+# Describes a single error injection for blkdebug.
+#
+# @event: trigger event
+#
+# @state: #optional the state identifier blkdebug needs to be in to
+# actually trigger the event; defaults to "any"
+#
+# @errno: #optional error identifier (errno) to be returned; defaults to
+# EIO
+#
+# @sector: #optional specifies the sector index which has to be affected
+# in order to actually trigger the event; defaults to "any
+# sector"
+#
+# @once: #optional disables further events after this one has been
+# triggered; defaults to false
+#
+# @immediately: #optional fail immediately; defaults to false
+#
+# Since: 2.0
+##
+{ 'type': 'BlkdebugInjectErrorOptions',
+ 'data': { 'event': 'BlkdebugEvent',
+ '*state': 'int',
+ '*errno': 'int',
+ '*sector': 'int',
+ '*once': 'bool',
+ '*immediately': 'bool' } }
+
+##
+# @BlkdebugSetStateOptions
+#
+# Describes a single state-change event for blkdebug.
+#
+# @event: trigger event
+#
+# @state: #optional the current state identifier blkdebug needs to be in;
+# defaults to "any"
+#
+# @new_state: the state identifier blkdebug is supposed to assume if
+# this event is triggered
+#
+# Since: 2.0
+##
+{ 'type': 'BlkdebugSetStateOptions',
+ 'data': { 'event': 'BlkdebugEvent',
+ '*state': 'int',
+ 'new_state': 'int' } }
+
+##
+# @BlockdevOptionsBlkdebug
+#
+# Driver specific block device options for blkdebug.
+#
+# @image: underlying raw block device (or image file)
+#
+# @config: #optional filename of the configuration file
+#
+# @inject-error: #optional array of error injection descriptions
+#
+# @set-state: #optional array of state-change descriptions
+#
+# Since: 2.0
+##
+{ 'type': 'BlockdevOptionsBlkdebug',
+ 'data': { 'image': 'BlockdevRef',
+ '*config': 'str',
+ '*inject-error': ['BlkdebugInjectErrorOptions'],
+ '*set-state': ['BlkdebugSetStateOptions'] } }
+
+##
+# @BlockdevOptionsBlkverify
+#
+# Driver specific block device options for blkverify.
+#
+# @test: block device to be tested
+#
+# @raw: raw image used for verification
+#
+# Since: 2.0
+##
+{ 'type': 'BlockdevOptionsBlkverify',
+ 'data': { 'test': 'BlockdevRef',
+ 'raw': 'BlockdevRef' } }
+
+##
# @BlockdevOptions
#
# Options for creating a block device.
@@ -4224,10 +4331,8 @@
# TODO sheepdog: Wait for structured options
# TODO ssh: Should take InetSocketAddress for 'host'?
'vvfat': 'BlockdevOptionsVVFAT',
-
-# TODO blkdebug: Wait for structured options
-# TODO blkverify: Wait for structured options
-
+ 'blkdebug': 'BlockdevOptionsBlkdebug',
+ 'blkverify': 'BlockdevOptionsBlkverify',
'bochs': 'BlockdevOptionsGenericFormat',
'cloop': 'BlockdevOptionsGenericFormat',
'cow': 'BlockdevOptionsGenericCOWFormat',
--
1.8.1.4
next prev parent reply other threads:[~2014-01-24 17:24 UTC|newest]
Thread overview: 94+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-24 17:20 [Qemu-devel] [PULL v2 00/93] Block patches Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 01/93] rbd: switch from pipe to QEMUBH completion notification Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 02/93] qemu-iotests: Introduce _unsupported_imgopts Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 03/93] qemu-iotests: Add _unsupported_imgopts for vmdk subformats Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 04/93] qemu-iotests: Clean up all extents for vmdk Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 05/93] block/iscsi: return -ENOMEM if an async call fails immediately Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 06/93] gluster: Convert aio routines into coroutines Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 07/93] gluster: Implement .bdrv_co_write_zeroes for gluster Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 08/93] gluster: Add support for creating zero-filled image Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 09/93] sheepdog: fix clone operation by 'qemu-img create -b' Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 10/93] qtest: Fix the bug about disable vnc causes "make check" fail Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 11/93] docs: qcow2 compat=1.1 is now the default Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 12/93] vmdk: Fix big flat extent IO Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 13/93] readline: decouple readline from the monitor Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 14/93] readline: move readline to a generic location Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 15/93] osdep: add qemu_set_tty_echo() Kevin Wolf
2014-01-24 17:20 ` [Qemu-devel] [PULL 16/93] qemu-io: use readline.c Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 17/93] qemu-io: add command completion Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 18/93] blkdebug: Use errp for read_config() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 19/93] blkdebug: Don't require sophisticated filename Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 20/93] qdict: Add qdict_array_split() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 21/93] qapi: extend qdict_flatten() for QLists Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 22/93] qemu-option: Add qemu_config_parse_qdict() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 23/93] blkdebug: Always call read_config() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 24/93] blkdebug: Use command-line in read_config() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 25/93] block: Allow reference for bdrv_file_open() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 26/93] block: Pass reference to bdrv_file_open() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 27/93] block: Allow block devices without files Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 28/93] block: Add bdrv_open_image() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 29/93] block: Use bdrv_open_image() in bdrv_open() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 30/93] block: Allow recursive "file"s Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 31/93] blockdev: Move "file" to legacy_opts Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 32/93] blkdebug: Allow command-line file configuration Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 33/93] blkverify: Allow command-line configuration Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 34/93] blkverify: Don't require protocol filename Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 35/93] qapi: Add "errno" to the list of polluted words Kevin Wolf
2014-01-24 17:21 ` Kevin Wolf [this message]
2014-01-24 17:21 ` [Qemu-devel] [PULL 37/93] qemu-io: Make filename optional Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 38/93] tests: Add test for qdict_array_split() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 39/93] tests: Add test for qdict_flatten() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 40/93] iotests: Test new blkdebug/blkverify interface Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 41/93] iotests: Test file format nesting Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 42/93] block: fix backing file segfault Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 43/93] dataplane: fix shadowed return value Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 44/93] qcow2: fix wrong value of L1E_OFFSET_MASK, L2E_OFFSET_MASK and REFT_OFFSET_MASK Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 45/93] vmdk: Check for overhead when opening Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 46/93] qemu-progress: Drop unused include Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 47/93] qemu-progress: Fix progress printing on SIGUSR1 Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 48/93] Documentation: qemu-img: Mention SIGUSR1 progress report Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 49/93] sheepdog: fix 'qemu-img map' Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 50/93] drive mirror:fix memory leak Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 51/93] vmdk: Fix format specific information (create type) for streamOptimized Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 52/93] qapi: Add "backing" to BlockStats Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 53/93] block: Add bs->node_name to hold the name of a bs node of the bs graph Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 54/93] block: Allow the user to define "node-name" option both on command line and QMP Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 55/93] qmp: Add QMP query-named-block-nodes to list the named BlockDriverState nodes Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 56/93] qmp: Allow to change password on named block driver states Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 57/93] block: Create authorizations mechanism for external snapshot and resize Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 58/93] qmp: Allow block_resize to manipulate bs graph nodes Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 59/93] qmp: Allow to take external snapshots on bs graphs node Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 60/93] block/curl: Implement the libcurl timer callback interface Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 61/93] block: resize backing file image during offline commit, if necessary Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 62/93] block: resize backing image during active layer commit, if needed Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 63/93] block: update block commit documentation regarding image truncation Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 64/93] block: Fix bdrv_commit return value Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 65/93] block: Move initialisation of BlockLimits to bdrv_refresh_limits() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 66/93] block: Inherit opt_transfer_length Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 67/93] block: Update BlockLimits when they might have changed Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 68/93] qemu_memalign: Allow small alignments Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 69/93] block: Detect unaligned length in bdrv_qiov_is_aligned() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 70/93] block: Don't use guest sector size for qemu_blockalign() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 71/93] block: rename buffer_alignment to guest_block_size Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 72/93] raw: Probe required direct I/O alignment Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 73/93] block: Introduce bdrv_aligned_preadv() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 74/93] block: Introduce bdrv_co_do_preadv() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 75/93] block: Introduce bdrv_aligned_pwritev() Kevin Wolf
2014-01-24 17:21 ` [Qemu-devel] [PULL 76/93] block: write: Handle COR dependency after I/O throttling Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 77/93] block: Introduce bdrv_co_do_pwritev() Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 78/93] block: Switch BdrvTrackedRequest to byte granularity Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 79/93] block: Allow waiting for overlapping requests between begin/end Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 80/93] block: Make zero-after-EOF work with larger alignment Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 81/93] block: Generalise and optimise COR serialisation Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 82/93] block: Make overlap range for serialisation dynamic Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 83/93] block: Allow wait_serialising_requests() at any point Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 84/93] block: Align requests in bdrv_co_do_pwritev() Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 85/93] block: Assert serialisation assumptions in pwritev Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 86/93] block: Change coroutine wrapper to byte granularity Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 87/93] block: Make bdrv_pread() a bdrv_prwv_co() wrapper Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 88/93] block: Make bdrv_pwrite() " Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 89/93] iscsi: Set bs->request_alignment Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 90/93] blkdebug: Make required alignment configurable Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 91/93] qemu-io: New command 'sleep' Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 92/93] qemu-iotests: Test pwritev RMW logic Kevin Wolf
2014-01-24 17:22 ` [Qemu-devel] [PULL 93/93] block: Switch bdrv_io_limits_intercept() to byte granularity Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1390584136-24703-37-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).