qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 13/30] block: do not reuse the backing file across b


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 13/30] block: do not reuse the backing file across bdrv_close/bdrv_open
Date: Thu, 10 May 2012 13:49:17 +0200

From: Paolo Bonzini <address@hidden>

This is another bug caused by not doing a full cleanup of the BDS
across close/open.  This was found with mirroring by Shaolong Hu,
but it can probably be reproduced also with eject or change.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 block.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block.c b/block.c
index 6dc0d44..271f109 100644
--- a/block.c
+++ b/block.c
@@ -878,6 +878,8 @@ void bdrv_close(BlockDriverState *bs)
         bs->opaque = NULL;
         bs->drv = NULL;
         bs->copy_on_read = 0;
+        bs->backing_file[0] = '\0';
+        bs->backing_format[0] = '\0';
 
         if (bs->file != NULL) {
             bdrv_close(bs->file);
-- 
1.7.6.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]