From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTzBt-00086E-8l for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:31:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QTzBr-0000sw-FG for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:31:41 -0400 Received: from mail-gx0-f173.google.com ([209.85.161.173]:54643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QTzBr-0000sn-4U for qemu-devel@nongnu.org; Tue, 07 Jun 2011 12:31:39 -0400 Received: by gxk26 with SMTP id 26so2520657gxk.4 for ; Tue, 07 Jun 2011 09:31:38 -0700 (PDT) Message-ID: <4DEE5267.3060702@codemonkey.ws> Date: Tue, 07 Jun 2011 11:31:35 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <20110601181255.077fb5fd@doriath> <4DE6B087.6010708@codemonkey.ws> <20110602145730.4c80d668@doriath> <4DE7CFA4.9040300@codemonkey.ws> <20110602150900.7d2657fb@doriath> <4DEC9D07.5080409@redhat.com> <4DECD163.9030704@codemonkey.ws> <20110607114609.1938a2c3@doriath> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] QMP: RFC: I/O error info & query-stop-reason List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Stefan Hajnoczi , jdenemar@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino On 06/07/2011 10:41 AM, Markus Armbruster wrote: > Luiz Capitulino writes: > >> On Mon, 06 Jun 2011 08:08:51 -0500 >> Anthony Liguori wrote: >> >>> On 06/06/2011 04:25 AM, Kevin Wolf wrote: >>>> Am 02.06.2011 20:09, schrieb Luiz Capitulino: >>>>>>> I'm ok with either way. But in case you meant the second one, I guess >>>>>>> we should make "reason" a dictionary so that we can group related >>>>>>> information when we extend the field, for example: >>>>>>> >>>>>>> "reason": { "no space": false, "no permission": true } >>>> >>>> Splitting up enums into a number of booleans looks like a bad idea to >>>> me. It makes things more verbose than they should be, and even worse, it >>>> implies that more than one field could be true. >>> >>> I agree. What I had suggested was to not have a reason at all. >> >> Is it better if we add a new enum to query-block? Like the "io-error" key we >> have talked about earlier? Like: >> >> "io-error": "no space" >> >> We could have "no space", "low level" (that's how the man page defines EIO) and >> "unknown". > > As mentioned before, I prefer my errnos straight, not wrapped in a pile > of pseudo-abstractions that make me go to the source code to figure out > how to unwrap them :) You want a log file. You want to spit out open strings that contain actual errno numbers. I'm 100% supportive of that. But QMP is an interface that we have to maintain forever and passing a valid that can be different on different platforms, that depends on the semantics of whatever function calls happen to currently be in the path, is not a good long term interface. We need to separate what we want to have as developers trying to debug and what we need to provide as a long term supported management interface. If we separately the two, we'll be much happier in both places. Regards, Anthony Liguori >