From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwWq3-0006O6-DU for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:11:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SwWpx-0000ZG-Os for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:11:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SwWpx-0000ZA-GX for qemu-devel@nongnu.org; Wed, 01 Aug 2012 07:11:33 -0400 Message-ID: <50190EDF.4090907@redhat.com> Date: Wed, 01 Aug 2012 13:11:27 +0200 From: Paolo Bonzini 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> In-Reply-To: <50190513.8090604@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: Kevin Wolf Cc: jcody@redhat.com, eblake@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com 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... Paolo