From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41519 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDzJh-0001Kd-Hm for qemu-devel@nongnu.org; Thu, 04 Nov 2010 08:53:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDzJg-0007jF-8V for qemu-devel@nongnu.org; Thu, 04 Nov 2010 08:53:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PDzJg-0007im-1k for qemu-devel@nongnu.org; Thu, 04 Nov 2010 08:53:20 -0400 Message-ID: <4CD2ACEB.8060400@redhat.com> Date: Thu, 04 Nov 2010 13:54:03 +0100 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] block: fix the use of protocols in backing files References: <1288203550-23698-1-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1288203550-23698-1-git-send-email-aliguori@us.ibm.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Adam Litke , qemu-devel@nongnu.org, Stefan Hajnoczi Am 27.10.2010 20:19, schrieb Anthony Liguori: > Signed-off-by: Anthony Liguori > > diff --git a/block.c b/block.c > index 1a965b2..00b6f21 100644 > --- a/block.c > +++ b/block.c > @@ -603,10 +603,16 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int flags, > BlockDriver *back_drv = NULL; > > bs->backing_hd = bdrv_new(""); > - path_combine(backing_filename, sizeof(backing_filename), > - filename, bs->backing_file); > - if (bs->backing_format[0] != '\0') > - back_drv = bdrv_find_format(bs->backing_format); > + back_drv = bdrv_find_protocol(bs->backing_file); > + if (!back_drv) { If no protocol is specified, bdrv_find_protocol doesn't return NULL but the file: driver. This breaks all backing file related qemu-iotests cases because qcow2 backing files are opened as raw files now. Kevin