From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O3lYU-0006yB-7R for qemu-devel@nongnu.org; Mon, 19 Apr 2010 03:38:06 -0400 Received: from [140.186.70.92] (port=35837 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O3lYR-0006xq-4D for qemu-devel@nongnu.org; Mon, 19 Apr 2010 03:38:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O3lYH-0002eg-Jt for qemu-devel@nongnu.org; Mon, 19 Apr 2010 03:38:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13899) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O3lYH-0002eE-7n for qemu-devel@nongnu.org; Mon, 19 Apr 2010 03:37:53 -0400 Message-ID: <4BCC0830.600@redhat.com> Date: Mon, 19 Apr 2010 09:37:20 +0200 From: Kevin Wolf MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3] vmdk: Convert to bdrv_open References: <1271447998-24718-1-git-send-email-kwolf@redhat.com> <1271447998-24718-4-git-send-email-kwolf@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 17.04.2010 11:39, schrieb Stefan Hajnoczi: > On Fri, Apr 16, 2010 at 8:59 PM, Kevin Wolf wrote: >> diff --git a/block/vmdk.c b/block/vmdk.c >> index 781518a..27b6360 100644 >> --- a/block/vmdk.c >> +++ b/block/vmdk.c >> @@ -835,14 +828,12 @@ static void vmdk_close(BlockDriverState *bs) >> qemu_free(s->l1_table); >> qemu_free(s->l2_cache); >> // try to close parent image, if exist >> - vmdk_parent_close(s->hd); >> - bdrv_delete(s->hd); >> + vmdk_parent_close(bs->file); >> } > > block.c:bdrv_close() calls bdrv_delete(bs->backing_hd) before > bs->bdrv_close(). The vmdk format doesn't need to explicitly close > its parent file and the vmdk_parent_close() function can be deleted. > vmdk.c is the only block driver that explicitly closes or deletes > backing_hd. Right, I should have removed this code in patch 2/3. I'll fix that and send a new version. Kevin