From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRuTH-0005Ot-H5 for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:51:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRuT8-0003pb-FS for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:50:55 -0400 Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:38568) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRuT8-0003pT-6p for qemu-devel@nongnu.org; Wed, 10 Sep 2014 22:50:46 -0400 Received: by mail-pd0-f173.google.com with SMTP id ft15so10306961pdb.18 for ; Wed, 10 Sep 2014 19:50:44 -0700 (PDT) Sender: Hitoshi Mitake Date: Thu, 11 Sep 2014 11:50:39 +0900 Message-ID: <87r3zij2f4.wl%mitake.hitoshi@lab.ntt.co.jp> From: Hitoshi Mitake In-Reply-To: <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> <20140902152914.GM29067@stefanha-thinkpad.redhat.com> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII 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: Stefan Hajnoczi Cc: Hitoshi Mitake , Kevin Wolf , qemu-devel@nongnu.org, mitake.hitoshi@gmail.com Hi Stefan, Eric, Sorry for my late reply. At Tue, 2 Sep 2014 16:29:14 +0100, Stefan Hajnoczi wrote: > > [1 ] > 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: > > > > > > [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. > > > > > > > > > > > > > > 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? > > > > > > 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. > > > > > > > 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. OK, I'll do it in v3. Thanks, Hitoshi > > Stefan > [2 ] >