From patchwork Fri Jul 2 16:38:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 57678 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 94ED41007D2 for ; Sat, 3 Jul 2010 02:45:35 +1000 (EST) Received: from localhost ([127.0.0.1]:41053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUjMp-0008P3-S5 for incoming@patchwork.ozlabs.org; Fri, 02 Jul 2010 12:45:31 -0400 Received: from [140.186.70.92] (port=40798 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OUjGQ-00048D-Ei for qemu-devel@nongnu.org; Fri, 02 Jul 2010 12:38:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OUjGP-0001Wl-33 for qemu-devel@nongnu.org; Fri, 02 Jul 2010 12:38:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38327) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OUjGO-0001Wc-Oy for qemu-devel@nongnu.org; Fri, 02 Jul 2010 12:38:53 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o62Gcpwx013704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 2 Jul 2010 12:38:51 -0400 Received: from localhost.localdomain (vpn2-11-67.ams2.redhat.com [10.36.11.67]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o62GcbbE023884; Fri, 2 Jul 2010 12:38:49 -0400 From: Kevin Wolf To: anthony@codemonkey.ws Date: Fri, 2 Jul 2010 18:38:15 +0200 Message-Id: <1278088712-12302-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1278088712-12302-1-git-send-email-kwolf@redhat.com> References: <1278088712-12302-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: kwolf@redhat.com, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 06/23] 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 From: Ryan Harper 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 Signed-off-by: Kevin Wolf --- block.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 0aaec3b..31ca4c5 100644 --- a/block.c +++ b/block.c @@ -400,7 +400,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;