Received: from eggs.gnu.org ([2001:4830:134:3::10]:53476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Lzo-0007hA-OB for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:59:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X2Lzh-000734-4s for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:58:52 -0400 Received: from oxygen.pond.sub.org ([144.76.244.19]:54315) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X2Lzg-000730-UT for qemu-devel@nongnu.org; Wed, 02 Jul 2014 10:58:45 -0400 From: Markus Armbruster References: <1403889855-5740-1-git-send-email-armbru@redhat.com> <1403889855-5740-2-git-send-email-armbru@redhat.com> <53B2EB0F.2050402@redhat.com> <53B2EBA0.8080108@redhat.com> <8738ekl05m.fsf@blackfin.pond.sub.org> <53B3C172.30606@redhat.com> Date: Wed, 02 Jul 2014 16:58:42 +0200 In-Reply-To: <53B3C172.30606@redhat.com> (Paolo Bonzini's message of "Wed, 02 Jul 2014 10:23:14 +0200") Message-ID: <87fvijyfh9.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2 2.1 1/3] blockjob: Fix recent BLOCK_JOB_READY regression List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, lcapitulino@redhat.com, wenchaoqemu@gmail.com, stefanha@redhat.com, qemu-devel@nongnu.org Paolo Bonzini writes: > Il 02/07/2014 08:55, Markus Armbruster ha scritto: >>> > I think this fixes itself automatically if you use >>> > rerror=stop/werror=stop on block jobs. At least that was part of the >>> > design, whether the implementation gets it right I cannot say without >>> > looking at the code more carefully. >> What if an underlying device doesn't support [rw]error=stop? Not all >> do... > > Then the "fix" is to add support to the underlying device. IDE, SCSI > and virtio-blk (plus virtio-scsi via SCSI of course) are covered; Where "covered" means "device model calls bdrv_error_action() somewhere" rather than "device model calls bdrv_error_action() exactly when it should". Case in point: SCSI calls it when UNMAP fails, but IDE doesn't call it when TRIM fails. IDE and virtio-blk call it for I/O beyond the end of the medium, but SCSI doesn't. This is of course fixable. I'm working on it. > the > main one that's left out is SD. Qdevified devices with a qdev_prop_drive: isa-fdc, sysbus-fdc, SUNW,fdtwo, nand, onenand, cfi.pflash01, cfi.pflash02, spapr-nvram, scsi-generic, nvme. SD isn't in this list, because it still hasn't been qdevified. There may be more. I'm afraid we're better at adding more devices than we are at updating devices to current interfaces. Thus, I'm inclined to accept existence of devices that don't (reliably) support [rw]error=stop as yet another sad fact of life.