[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Disk images deleted with -snapshot
From: |
Blue Swirl |
Subject: |
[Qemu-devel] Disk images deleted with -snapshot |
Date: |
Fri, 23 Jul 2010 18:14:20 +0000 |
Somehow, one of my CD images disappeared after use. It seems to be a
horrible bug with -snapshot:
$ touch image.iso image2.iso
$ qemu -cdrom image.iso -monitor stdio
QEMU 0.12.50 monitor - type 'help' for more information
(qemu) change ide1-cd0 image2.iso
(qemu) change ide1-cd0 image.iso
(qemu) q
$ qemu -snapshot -cdrom image.iso -monitor stdio
unlink(/tmp/vl.E5vyzl) in /src/qemu/block.c:466
QEMU 0.12.50 monitor - type 'help' for more information
(qemu) change ide1-cd0 image2.iso
unlink(image2.iso) in /src/qemu/block.c:466
(qemu) change ide1-cd0 image.iso
unlink(image.iso) in /src/qemu/block.c:466
Could not open 'image.iso'
(qemu) q
$ ls image*.iso
ls: cannot access image*.iso: No such file or directory
diff --git a/block.c b/block.c
index f837876..21d5352 100644
--- a/block.c
+++ b/block.c
@@ -463,6 +463,7 @@ static int bdrv_open_common(BlockDriverState *bs,
const char *filename,
#ifndef _WIN32
if (bs->is_temporary) {
+ fprintf(stderr, "unlink(%s) in %s:%d\n", filename, __FILE__, __LINE__);
unlink(filename);
}
#endif
@@ -628,6 +629,7 @@ int bdrv_open(BlockDriverState *bs, const char
*filename, int flags,
unlink_and_fail:
if (bs->is_temporary) {
+ fprintf(stderr, "unlink(%s) in %s:%d\n", filename, __FILE__, __LINE__);
unlink(filename);
}
return ret;
@@ -647,6 +649,7 @@ void bdrv_close(BlockDriverState *bs)
qemu_free(bs->opaque);
#ifdef _WIN32
if (bs->is_temporary) {
+ fprintf(stderr, "unlink(%s) in %s:%d\n", filename,
__FILE__, __LINE__);
unlink(bs->filename);
}
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] Disk images deleted with -snapshot,
Blue Swirl <=