Don't reset bs->is_temporary in bdrv_open_common
PATCH 1/1 Don't reset bs->is_temporary in bdrv_open_common
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 <[email protected]>
--- block.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
block.c +0 -1
@@ -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;
Signature · 8 lines
1.6.3.3 -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx [email protected]
Kevin Wolf
AppliedAm 28.06.2010 16:38, schrieb Ryan Harper:
Quoted 7 lines
To fix https://bugs.launchpad.net/qemu/+bug/597402 where qemu fails to call
unlink()on temporary snapshots due tobs->is_temporarygetting clobbered inbdrv_open_common()after being set inbdrv_open()which calls the former.We don't need to initialize
bs->is_temporaryinbdrv_open_common().Signed-off-by Ryan Harper <[email protected]>
Thanks, applied to the block branch.
Kevin