From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcHhk-00060h-Kq for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:18:04 -0500 Received: from [199.232.76.173] (port=60718 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcHhj-0005zH-Vb for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:18:04 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcHhG-0005L3-S1 for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:18:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:31788) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcHhF-0005KL-R0 for qemu-devel@nongnu.org; Tue, 02 Feb 2010 07:17:34 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o12CHVhk023671 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Feb 2010 07:17:32 -0500 Date: Tue, 2 Feb 2010 10:17:23 -0200 From: Luiz Capitulino Message-ID: <20100202101723.291a57f2@doriath> In-Reply-To: <4B67EF7F.8060308@redhat.com> References: <1265047668-15039-1-git-send-email-lcapitulino@redhat.com> <4B67EF7F.8060308@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC 0/2]: QMP DISK_ERROR event List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On Tue, 02 Feb 2010 10:25:19 +0100 Kevin Wolf wrote: > Hi Luiz, > > Am 01.02.2010 19:07, schrieb Luiz Capitulino: > > Hi there, > > > > I've been requested by libvirt guys to add a QMP event for disk I/O errors, > > this is what this series is about. > > > > It's a RFC because I need feedback on the following: > > > > 1. drive_get_on_error() is called on all disk errors, right? > > Well, yes, it is for all devices that support rerror/werror. But it also > might be called in other situations. Look at the "get" in the function > name, it's really a getter function and not a event handler. > > > 2. I've tested only ENOSPC errors, is there a way to test other errors? Like > > read ones? > > So you'll probably want some EIO. Some recent bugs I've been handling > were a about images on NFS when the NFS server want away. It's a > reliable way to get EIO (mount with -osoft and small timeouts). I guess > qemu-nbd and the nbd: protocol might work, too. > > Or maybe copy the start of a qcow2 image to a too small device. Thanks! > > 3. Is this the right approach at all? :) > > Yes and no. As I said above, drive_get_on_error() is not the right place > to do it. Unfortunately it looks like there isn't a single generic place > where it can be done, but the call to the event handler must be added to > every device. Can't it be added to subsystems? Like ide, virtio etc? Maybe in the same function that calls driver_get_on_error()?