From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS5ub-0001dz-IU for qemu-devel@nongnu.org; Wed, 09 May 2012 08:22:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SS5uV-0001pQ-7m for qemu-devel@nongnu.org; Wed, 09 May 2012 08:22:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SS5uU-0001oi-W0 for qemu-devel@nongnu.org; Wed, 09 May 2012 08:22:27 -0400 Message-ID: <4FAA617D.1030908@redhat.com> Date: Wed, 09 May 2012 14:22:21 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1336488722-13120-1-git-send-email-pbonzini@redhat.com> <1336488722-13120-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1336488722-13120-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.1 04/22] block: fully delete bs->file when closing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 08.05.2012 16:51, schrieb Paolo Bonzini: > We are reusing bs->file across close/open, which may not cause any > known bugs but is a recipe for trouble. Prefer bdrv_delete, and > enjoy the new invariant in the implementation of bdrv_delete. > > Signed-off-by: Paolo Bonzini I think bs->file is changed during bdrv_open() for all block drivers that make use of it. We do however leak the old bs->file then. Kevin