From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO13E-0002Kw-O1 for qemu-devel@nongnu.org; Tue, 16 Oct 2012 02:54:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO13D-0001lR-Rx for qemu-devel@nongnu.org; Tue, 16 Oct 2012 02:54:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44288) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO13D-0001lN-JS for qemu-devel@nongnu.org; Tue, 16 Oct 2012 02:54:51 -0400 Message-ID: <507D04B6.8010308@redhat.com> Date: Tue, 16 Oct 2012 08:54:46 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20121015.183337.17413021.k.suzaki@aist.go.jp> <507C0EBC.3030805@redhat.com> <20121016.152349.133292964.k.suzaki@aist.go.jp> In-Reply-To: <20121016.152349.133292964.k.suzaki@aist.go.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] delvm does not reduce the qcow2 file size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kuniyasu Suzaki Cc: qemu-devel@nongnu.org Il 16/10/2012 08:23, Kuniyasu Suzaki ha scritto: >>> "delvm" is a command to delete a snapshot image in a qcow2 file. >>> However it does not reduce the qcow2 file size. >> >> Note that the file will not grow when new allocations are performed in >> the future. > > You mean that the qcow2 file size will not increase when "savevm" > commnad is issued after "delvm". > Namely, the qcow2 file size is almost same when I take a snapshot > after delete previous snapshot image. Exactly. The first writes to the qcow2 file will also reuse the space left free by "delvm", if they have to allocate new clusters. >> QEMU should also convert the unused clusters to "holes" in the file >> system, but it doesn't do that yet. > > I hope a qcow2 file is reduced automatically when a snapshot is deleted. Yes, that's part of the plan. The file would not reduce its size, but the space would still be given back to the filesystem. Paolo