From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3SFW-0007p7-T6 for qemu-devel@nongnu.org; Wed, 15 Jan 2014 10:19:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3SFR-0004HD-R4 for qemu-devel@nongnu.org; Wed, 15 Jan 2014 10:19:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:7645) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3SFR-0004H5-HS for qemu-devel@nongnu.org; Wed, 15 Jan 2014 10:19:17 -0500 Message-ID: <52D6A6E5.8080407@redhat.com> Date: Wed, 15 Jan 2014 08:19:01 -0700 From: Eric Blake MIME-Version: 1.0 References: <1389781375-11774-1-git-send-email-kwolf@redhat.com> <1389781375-11774-37-git-send-email-kwolf@redhat.com> In-Reply-To: <1389781375-11774-37-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ps2fnrrtlWlTHtkuTPW7498FAoKf37vRr" Subject: Re: [Qemu-devel] [PULL 36/42] qapi: QMP interface for blkdebug and blkverify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , anthony@codemonkey.ws Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ps2fnrrtlWlTHtkuTPW7498FAoKf37vRr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 01/15/2014 03:22 AM, Kevin Wolf wrote: > From: Max Reitz >=20 > Add structures to support blkdebug and blkverify in blockdev-add. >=20 > Signed-off-by: Max Reitz > Signed-off-by: Kevin Wolf > --- > qapi-schema.json | 113 +++++++++++++++++++++++++++++++++++++++++++++++= ++++++-- > 1 file changed, 109 insertions(+), 4 deletions(-) Sorry for not noticing this sooner, but we still have some interface problems that need to be ironed out. >=20 > 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' } } > =20 > ## > +# @BlkdebugEvent > +# > +# Trigger events supported by blkdebug. > +## > +{ 'enum': 'BlkdebugEvent', Missing a 'Since: 2.0' designation; would be worth adding that in a followup patch. > + '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.wri= te', > + 'read_aio', 'read_backing_aio', 'read_compressed', 'write_= aio', > + 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_r= ead', > + 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_u= pdate', > + 'refblock_load', 'refblock_update', 'refblock_update_part'= , > + 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc= =2Ewrite', > + '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' ] } Do we want to prefer '-' over '_' in all these names? > + > +## > +# @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" This sounds like it is a finite set of states, and therefore should be an enum rather than an 'int'. > +# > +# @errno: #optional error identifier (errno) to be returned; def= aults to > +# EIO errno is not a portable. The values of errno on one machine may not match the values of errno on the other machine using the QMP connection via a remote socket. It might be cleaner to have an enum of named error values, rather than integer errno values. > +# > +# @sector: #optional specifies the sector index which has to be a= ffected > +# in order to actually trigger the event; defaults to "a= ny > +# sector" > +# > +# @once: #optional disables further events after this one has b= een > +# 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" > +# Again, this should be an enum, not an int. > +# @new_state: the state identifier blkdebug is supposed to assume if= > +# this event is triggered s/new_state/new-state/ > @@ -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', As we are adding new arms to the union, we should document that these values are available since 2.0. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Ps2fnrrtlWlTHtkuTPW7498FAoKf37vRr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJS1qbmAAoJEKeha0olJ0NqGmcH/ihC8n8WynFCTrxWQbh31Ngw ooCBHBkK/87ZLEsOLYG7jcaauAERIDStNFYv8yAXlzVBDnS4CwgCdq83IT295I2c HA0RJj+hzvGlQujEydyLdFqSKvl7CQleatRufJfDMx9r1u2EP6RCxZVihpTTbqat 8jAM9r4d0gvf03QTFK+a8no7iLW/G6nD0gf0CTXy552SMsrc+Ta4U3eaSf0KDRW0 u0GzLOJ/ZTrsog8vl70ydXQTWB/ZWbbLGqWNh6FT1bW3R/FQqWeUZwCODKDTRKjt 9xKZUFgBVdYudXA/7uQsrg1w542rc+kP2zx3/S7ae/w65pPVylnSjg0BGphFwTA= =nPDo -----END PGP SIGNATURE----- --Ps2fnrrtlWlTHtkuTPW7498FAoKf37vRr--