From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO5Be-0007D7-QF for qemu-devel@nongnu.org; Tue, 16 Oct 2012 07:19:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO5Bd-00062P-Mw for qemu-devel@nongnu.org; Tue, 16 Oct 2012 07:19:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38325) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO5Bd-000629-Dg for qemu-devel@nongnu.org; Tue, 16 Oct 2012 07:19:49 -0400 Message-ID: <507D42CE.1030107@redhat.com> Date: Tue, 16 Oct 2012 13:19:42 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <507C0EBC.3030805@redhat.com> <20121016.152349.133292964.k.suzaki@aist.go.jp> <507D04B6.8010308@redhat.com> <20121016.200633.61119037.k.suzaki@aist.go.jp> In-Reply-To: <20121016.200633.61119037.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 13:06, Kuniyasu Suzaki ha scritto: >>>> 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. > Do you plan to use a space file system? Any file system that support holes, including ext2/3/4 or btrfs or XFS, would actually reclaim the space. > Is it difficult to reduce a qcow2 file when a snapshot is deleted? There is no guarantee that no data was allocated after the snapshot. If it was, it is not possible to reduce the qcow2 file's size without implementing some kind of "defragmentation". Paolo