From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52543 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTI6D-0001nz-FE for qemu-devel@nongnu.org; Thu, 16 Dec 2010 12:58:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTI6B-0003oA-MG for qemu-devel@nongnu.org; Thu, 16 Dec 2010 12:58:41 -0500 Received: from mail-ew0-f45.google.com ([209.85.215.45]:56849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTI6B-0003nv-Ga for qemu-devel@nongnu.org; Thu, 16 Dec 2010 12:58:39 -0500 Received: by ewy10 with SMTP id 10so2160360ewy.4 for ; Thu, 16 Dec 2010 09:58:38 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1292257747-10665-5-git-send-email-kwolf@redhat.com> References: <1292257747-10665-1-git-send-email-kwolf@redhat.com> <1292257747-10665-5-git-send-email-kwolf@redhat.com> Date: Thu, 16 Dec 2010 17:58:38 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH 4/4] qcow2: Use block-queue 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 Mon, Dec 13, 2010 at 4:29 PM, Kevin Wolf wrote: > diff --git a/block/qcow2.c b/block/qcow2.c > index 537c479..e445913 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -136,6 +136,20 @@ static int qcow_read_extensions(BlockDriverState *bs= , uint64_t start_offset, > =A0 =A0 return 0; > =A0} > > +static bool qcow_blkqueue_error_cb(void *opaque, int ret) > +{ > + =A0 =A0BlockDriverState *bs =3D opaque; > + =A0 =A0BlockErrorAction action =3D bdrv_get_on_error(bs, 0); > + > + =A0 =A0if ((action =3D=3D BLOCK_ERR_STOP_ENOSPC && ret =3D=3D -ENOSPC) > + =A0 =A0 =A0 =A0|| action =3D=3D BLOCK_ERR_STOP_ANY) > + =A0 =A0{ > + =A0 =A0 =A0 =A0bdrv_mon_event(bs, BDRV_ACTION_STOP, 0); > + =A0 =A0 =A0 =A0return vm_stop(0); > + =A0 =A0} > + > + =A0 =A0return false; > +} Not sure this is qcow2-specific. Is it possible to put this in a generic sysemu-specific place and qemu-tool.c? That would allow the vm_stop() change to be dropped. Stefan