Received: from [140.186.70.92] (port=45077 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PrCxw-0001AJ-Qf for qemu-devel@nongnu.org; Sun, 20 Feb 2011 12:21:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PrCxv-0006AF-72 for qemu-devel@nongnu.org; Sun, 20 Feb 2011 12:21:00 -0500 Received: from adelie.canonical.com ([91.189.90.139]:35504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PrCxv-00069z-1X for qemu-devel@nongnu.org; Sun, 20 Feb 2011 12:20:59 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PrCxt-0002lT-Uy for ; Sun, 20 Feb 2011 17:20:58 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E85172E80CF for ; Sun, 20 Feb 2011 17:20:57 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sun, 20 Feb 2011 17:13:41 -0000 From: Aurelien Jarno Sender: bounces@canonical.com References: <20100622193019.15208.62389.malonedeb@potassium.ubuntu.com> Message-Id: <20110220171342.30233.97584.launchpad@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 597402] Re: qemu does not call unlink() on temp files in snapshot mode Reply-To: Bug 597402 <597402@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Changed in: qemu Status: Fix Committed =3D> Fix Released -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/597402 Title: qemu does not call unlink() on temp files in snapshot mode Status in QEMU: Fix Released Bug description: =3D=3D overview =3D=3D 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 =3D=3D steps to reproduce =3D=3D 1) Boot a guest like so: qemu -m 512 -drive file=3D/scratch/images/mdroth/rhel54_64_base.raw,snapshot=3Don =3D=3D actual results =3D=3D /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=3D/media/secondary/vm/fc12_64_base.raw,snapshot=3Don & [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 =3D=3D expected results =3D=3D temporary files should immediately be unlink()'ed and not be present in t= he file listing. =3D=3D system details =3D=3D 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 200= 9 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 --v= ersion QEMU emulator version 0.12.50, Copyright (c) 2003-2008 Fabrice Bellard