From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcF1V-00030Y-Op for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:26:17 -0500 Received: from [199.232.76.173] (port=48321 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcF1U-0002z7-BV for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:26:16 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NcF1S-0001M5-8k for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:26:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20979) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NcF1R-0001KO-Ie for qemu-devel@nongnu.org; Tue, 02 Feb 2010 04:26:13 -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 o129QBBv023774 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Feb 2010 04:26:11 -0500 Message-ID: <4B67EF7F.8060308@redhat.com> Date: Tue, 02 Feb 2010 10:25:19 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1265047668-15039-1-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1265047668-15039-1-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 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: Luiz Capitulino Cc: qemu-devel@nongnu.org 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. > 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. Kevin