From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOqFU-0001tQ-Su for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:44:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOqFO-0007uC-Na for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:44:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOqFO-0007u2-Fo for qemu-devel@nongnu.org; Tue, 02 Sep 2014 11:43:54 -0400 Date: Tue, 2 Sep 2014 16:29:14 +0100 From: Stefan Hajnoczi Message-ID: <20140902152914.GM29067@stefanha-thinkpad.redhat.com> References: <1409104780-31445-1-git-send-email-mitake.hitoshi@lab.ntt.co.jp> <53FD4881.4040007@redhat.com> <87r402binc.wl%mitake.hitoshi@lab.ntt.co.jp> <53FDD285.4090406@redhat.com> <874mwxf86v.wl%mitake.hitoshi@lab.ntt.co.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/t6ASE28jIy1gGy9" Content-Disposition: inline In-Reply-To: <874mwxf86v.wl%mitake.hitoshi@lab.ntt.co.jp> Subject: Re: [Qemu-devel] [PATCH v2] blkdebug: make the fault injection functionality callable from QMP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hitoshi Mitake Cc: Kevin Wolf , qemu-devel@nongnu.org, mitake.hitoshi@gmail.com --/t6ASE28jIy1gGy9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 28, 2014 at 03:18:48PM +0900, Hitoshi Mitake wrote: > At Wed, 27 Aug 2014 06:43:49 -0600, > Eric Blake wrote: > >=20 > > [1 ] > > On 08/26/2014 11:34 PM, Hitoshi Mitake wrote: > > Actually, if you use a type-safe qapi definition, you may not even need > > to do raw qdict operations, but can just directly use the C struct that > > gets generated as a result of the qapi. > >=20 > >=20 > > >=20 > > > I also like the detailed specification. But, there are bunch of event > > > names (the event_names array of block/blkdebug.c). In addition, the > > > rule of blkdebug can be extended. So I think defining it in two palces > > > (qapi-schema.json and block/blkdebug.c) is hard to maintain. Parsing > > > qdict in blkdebug.c would be simpler. How do you think? > >=20 > > No, don't do duplication. Instead, fix blkdebug.c to USE the enum > > generated by the .json, and you only have to maintain the list in one > > place - the .json file. > >=20 >=20 > OK, I understand your opinion. But it requires amount of change in > existing blkdebug implementation. So I want to hear opinions from the > maintainers. How do you think about this idea (maintaining blkdebug > events in .json format for avoiding duplication), Stefan and Kevin? It would be nice to specify the rule syntax using qapi JSON. I'm not sure if we can eliminate the QemuOptsList but it's probably possible to avoid qdict or ini file parsing and instead use qapi visitors to convert input to C structs. It's worth a try. Stefan --/t6ASE28jIy1gGy9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUBeJKAAoJEJykq7OBq3PI1eAH/R9deoeT4ZegHOS1NNfnmS+S csLO4GNxfQ1/RISsbAMhyjCivZk5nCN3oHEmKsFEuAhA5uUIP6Edaz7raJnbNQIJ X789AkoDOSnwJxX0odFM+7Cjctn+MAw+sh/9c9opiCvKZXAg+++NOllMF+BL5aHQ JF/plvSECHQm0bz+L1IPOj4j1fl6hGtuWwpccx5dNasY+eOCI9ZgR6pBVfoC9ioi WHqWwDHpBP2mzE6l6ZMfnvjTZE8ZEnn3ge/fi0+cOJJ/fv8jh+yO8EhdyXbgp4dl ij6QoGHbyE4ZdtR3RDvHlxq8hnRm+BGVHNkzqcKOiLTS4ji3fopDDZrR+aqVeGw= =XHPX -----END PGP SIGNATURE----- --/t6ASE28jIy1gGy9--