Received: from eggs.gnu.org ([2001:4830:134:3::10]:57766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7NYa-0004Rg-4N for qemu-devel@nongnu.org; Thu, 08 Aug 2013 06:35:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7NYS-0007CT-NF for qemu-devel@nongnu.org; Thu, 08 Aug 2013 06:34:59 -0400 Received: from ramses-pyramidenbau.de ([78.47.114.252]:44648 helo=mail.ramses-pyramidenbau.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7NYS-0007CB-HJ for qemu-devel@nongnu.org; Thu, 08 Aug 2013 06:34:52 -0400 Received: from [10.0.0.101] (rfhinf217.hs-regensburg.de [194.95.108.212]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.ramses-pyramidenbau.de (Postfix) with ESMTPSA id 5F73F608A8 for ; Thu, 8 Aug 2013 12:34:48 +0200 (CEST) Message-ID: <5203744F.4010407@ramses-pyramidenbau.de> Date: Thu, 08 Aug 2013 12:34:55 +0200 From: Ralf Ramsauer MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Using TRIM to shrink qcow2 images List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, QCOW2 uses a similar idea like file holes (sparse files) on filesystems [1]. RAW Images also may use file holes. If qemu would support TRIM, then the guest could easily discard and zero all unused blocks. The host system could detect all unused blocks in a (e.g.) qcow2 image and shrink it down to its minimum size. Did anyone already think about that? [1] : https://people.gnome.org/~markmc/qcow-image-format.html Regards, -- Ralf Ramsauer PGP: 0x8F10049B