qemu does not call unlink() on temp files in snapshot mode

Bug #597402 reported by Michael Roth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

== overview ==

When booting guests in snapshot mode qemu never calls unlink()
on the files storing changes to the images. This results in large amounts of
disk space being used over time.

This bug seems to have been introduced by qemu git commit b6ce07aa83bdee3cfd2610f270a0ce304e78df95

== steps to reproduce ==

1) Boot a guest like so:

qemu -m 512 -drive
file=/scratch/images/mdroth/rhel54_64_base.raw,snapshot=on

== actual results ==

/tmp/vl.* files are created and never unlinked/deleted. for example:

mdroth@illuin:~/dev/kvm/qemu-build$ x86_64-softmmu/qemu-system-x86_64 -m 512 -drive file=/media/secondary/vm/fc12_64_base.raw,snapshot=on &
[1] 24080

mdroth@illuin:~/dev/kvm/qemu-build$ ls -l /tmp/vl*
-rw------- 1 mdroth mdroth 262144 2010-06-22 14:21 /tmp/vl.tFSAmR

mdroth@illuin:~/dev/kvm/qemu-build$ fuser /tmp/vl*
/tmp/vl.tFSAmR: 24080

== expected results ==

temporary files should immediately be unlink()'ed and not be present in the file
listing.

== system details ==

mdroth@illuin:~/dev/kvm/qemu-build$ uname -a
Linux illuin 2.6.31-17-generic #54-Ubuntu SMP Thu Dec 10 17:01:44 UTC 2009 x86_64 GNU/Linux

latest commit (cada87c432e3b9cd55869a24055baf2b7bc0b70c) from qemu.git master branch:

mdroth@illuin:~/dev/kvm/qemu-build$ x86_64-softmmu/qemu-system-x86_64 --version
QEMU emulator version 0.12.50, Copyright (c) 2003-2008 Fabrice Bellard

Revision history for this message
blueswirl (blauwirbel) wrote :

Does not seem to happen anymore:

strace -etrace=unlink -esignal= -f ./qemu -drive file=/dev/null,snapshot=on
unlink("/tmp/vl.jUbLWz") = 0

Changed in qemu:
status: New → Fix Committed
Aurelien Jarno (aurel32)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.