From e117f91f3fa9175eb793c4085336ea6c9530cc14 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Thu, 15 Jul 2010 10:06:01 -0300 Subject: [PATCH 6/9] Don't reset bs->is_temporary in bdrv_open_common RH-Author: Amit Shah Message-id: <1386c299a8d157fe46e6d9ccf8ddde814eaa7c87.1279188354.git.amit.shah@redhat.com> Patchwork-id: 10735 O-Subject: [RHEL6.0 PATCH] Don't reset bs->is_temporary in bdrv_open_common Bugzilla: 611797 RH-Acked-by: Christoph Hellwig RH-Acked-by: Markus Armbruster RH-Acked-by: Kevin Wolf 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 (cherry picked from commit 15c7733bb231090e5ebd6d10060dccdb98bb4941) Bugzilla: 611797 Signed-off-by: Amit Shah --- block.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) Signed-off-by: Eduardo Habkost --- block.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 1b6ae4d..d250c0d 100644 --- a/block.c +++ b/block.c @@ -394,7 +394,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; -- 1.7.0.3