From patchwork Mon Jun 28 14:38:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Harper X-Patchwork-Id: 57145 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EAAA7B6EEF for ; Tue, 29 Jun 2010 00:39:50 +1000 (EST) Received: from localhost ([127.0.0.1]:39750 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTFUy-0007ph-3E for incoming@patchwork.ozlabs.org; Mon, 28 Jun 2010 10:39:48 -0400 Received: from [140.186.70.92] (port=58628 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTFUO-0007o9-7i for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:39:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTFUM-0001xV-Np for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:39:12 -0400 Received: from e34.co.us.ibm.com ([32.97.110.152]:57165) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFUM-0001vY-IS for qemu-devel@nongnu.org; Mon, 28 Jun 2010 10:39:10 -0400 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e34.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o5SEUk7w010542 for ; Mon, 28 Jun 2010 08:30:46 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o5SEchBo097340 for ; Mon, 28 Jun 2010 08:38:46 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o5SEcghH002171 for ; Mon, 28 Jun 2010 08:38:42 -0600 Received: from localhost.localdomain (frylock.austin.ibm.com [9.53.41.12]) by d03av03.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o5SEcfi7001523; Mon, 28 Jun 2010 08:38:42 -0600 Received: by localhost.localdomain (Postfix, from userid 1000) id ABDA41BF82; Mon, 28 Jun 2010 09:38:33 -0500 (CDT) Date: Mon, 28 Jun 2010 09:38:33 -0500 From: Ryan Harper To: Michael Roth Message-ID: <20100628143833.GB1647@us.ibm.com> Mime-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.6+20040907i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Kevin Wolf , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] Don't reset bs->is_temporary in bdrv_open_common X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org To fix https://bugs.launchpad.net/qemu/+bug/597402 where qemu fails to call unlink() on temporary snapshots due to bs->is_temporary getting clobbered in bdrv_open_common() after being set in bdrv_open() which calls the former. We don't need to initialize bs->is_temporary in bdrv_open_common(). Signed-off-by: Ryan Harper --- block.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index e71a771..a55882e 100644 --- a/block.c +++ b/block.c @@ -393,7 +393,6 @@ static int bdrv_open_common(BlockDriverState *bs, const char *filename, bs->file = NULL; bs->total_sectors = 0; - bs->is_temporary = 0; bs->encrypted = 0; bs->valid_key = 0; bs->open_flags = flags;