diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-05-08 16:51:43 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-10 10:32:12 +0200 |
commit | a275fa42fa872828585e9e6a92f975e87776554b (patch) | |
tree | 353f0557791d7203d9587e291a65c5277a6606bf /block.c | |
parent | 3a389e7926750cba5c83f662b1941888b2bebc04 (diff) |
block: do not reuse the backing file across bdrv_close/bdrv_open
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 <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |