From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50961) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSEvn-0003pF-FP for qemu-devel@nongnu.org; Thu, 02 Jun 2011 16:55:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSEvl-0002YD-PA for qemu-devel@nongnu.org; Thu, 02 Jun 2011 16:55:51 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:34853) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSEvl-0002Xn-Ca for qemu-devel@nongnu.org; Thu, 02 Jun 2011 16:55:49 -0400 Received: by pwi6 with SMTP id 6so748517pwi.4 for ; Thu, 02 Jun 2011 13:55:48 -0700 (PDT) Message-ID: <4DE7F8D0.5000302@codemonkey.ws> Date: Thu, 02 Jun 2011 15:55:44 -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> <4DE7D790.70807@codemonkey.ws> <20110602161318.0d9a2194@doriath> <4DE7ECA8.1050202@codemonkey.ws> <4DE7EED6.2090609@redhat.com> In-Reply-To: <4DE7EED6.2090609@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [libvirt] QMP: RFC: I/O error info & query-stop-reason List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Kevin Wolf , "libvir-list@redhat.com" , jdenemar@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino On 06/02/2011 03:13 PM, Eric Blake wrote: > On 06/02/2011 02:03 PM, Anthony Liguori wrote: >>>>>>>>> { "event": "BLOCK_IO_ERROR", >>>>>>>>> "data": { "device": "ide0-hd1", >>>>>>>>> "operation": "write", >>>>>>>>> "action": "stop", >>>>>>>>> "reason": "enospc", } >>>>>>>> > >>>>>>> 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 } > > The idea for an event with details certainly has merit. In an ideal would, would would just embed the BlockDeviceInfo structure in the event and call it a day. In a less than ideal world, I think it's better to make a call to query-block after having received the BLOCK_IO_ERROR event. > >>>>>> >>>>>> Why would we ever have "no permission"? > > SELinux denial, perhaps? Maybe, but that would take a considerable amount of magic to make happen in practice. Really only sounds plausible as an sVirt bug. I think you could only make this happen if you you doing dynamic labelling. Regards, Anthony Liguori > >> >>> Maybe libvirt guys could provide more input wrt the error reason usage. >>> If we don't have valid use cases for other errors, then I'll agree that >>> providing only "no space" is enough. >> >> Definitely! Adding libvirt to the CC to help encourage their input. > > We could always start with just one reason "no space", and add more > later if and when we come up for use cases. >