From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXMU-0000ew-Ij for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:45:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwXMT-00022p-KP for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:45:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwXMT-00022j-CE for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:45:09 -0400 Message-ID: <501916BF.6090603@redhat.com> Date: Wed, 01 Aug 2012 13:45:03 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1343127865-16608-1-git-send-email-pbonzini@redhat.com> <1343127865-16608-15-git-send-email-pbonzini@redhat.com> <50190513.8090604@redhat.com> <50190EDF.4090907@redhat.com> In-Reply-To: <50190EDF.4090907@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 14/47] stream: add on-error argument List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 01.08.2012 13:11, schrieb Paolo Bonzini: > Il 01/08/2012 12:29, Kevin Wolf ha scritto: >>>> + if ((on_error == BLOCKDEV_ON_ERROR_STOP || >>>> + on_error == BLOCKDEV_ON_ERROR_ENOSPC) && >>>> + !bdrv_iostatus_is_enabled(bs)) { >>>> + error_set(errp, QERR_INVALID_PARAMETER, "on-error"); >>>> + return; >>>> + } >> Hm, this is an interesting one. bdrv_iostatus_is_enabled() returns true >> for a block device that is (or was once) attached to virtio-blk, IDE or >> scsi-disk. Which made sense so far because only these devices would >> actually set the status. >> >> Now with block jobs, we have other places that can set the status. And >> we have images that don't belong to any device, but can still get errors >> (mirror target). Maybe it would make sense to just enable the iostatus >> here instead of failing? > > I'm not sure what would happen, so I preferred to be safe. > > The right solution would be "support iostatus in sd and friends, and > drop bdrv_iostatus_is_enabled altogether", of course... Support it _for_ sd and friends, but support it _in_ the block layer. What's missing before this can happen is a VMState for the block layer so that requeued requests can be migrated. Breaks migration compatibility, obviously. Kevin