From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuGLN-0008Dv-Qh for qemu-devel@nongnu.org; Thu, 05 Nov 2015 03:56:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuGLJ-0004t7-I1 for qemu-devel@nongnu.org; Thu, 05 Nov 2015 03:56:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36316) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuGLJ-0004t2-CW for qemu-devel@nongnu.org; Thu, 05 Nov 2015 03:56:25 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 1A45AC0D61A5 for ; Thu, 5 Nov 2015 08:56:24 +0000 (UTC) Date: Thu, 5 Nov 2015 08:56:22 +0000 From: "Richard W.M. Jones" Message-ID: <20151105085622.GQ29330@redhat.com> References: <20151104163730.GB28428@redhat.com> <20151105071449.GH24893@ad.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151105071449.GH24893@ad.usersys.redhat.com> Subject: Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org On Thu, Nov 05, 2015 at 03:14:49PM +0800, Fam Zheng wrote: > I don't think this the purpose of "qemu-img commit". Committing > "new" data in overlay.qcow2 has little to do with discarding backing > image's fragments where there are only explict zeroes. In that case, why didn't this step sparsify the backing file? > > (3) Sparsify the overlay: > > > > $ virt-sparsify --in-place overlay.qcow2 > > $ du -sh fedora-22.img overlay.qcow2 > > 6.1G fedora-22.img > > 3.2M overlay.qcow2 > qemu-img convert fedora-22.img fedora-22.img.1 > > I don't think we have an in-place sparsifier now. virt-sparsify ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top