From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sipku-0001pG-Ok for qemu-devel@nongnu.org; Sun, 24 Jun 2012 12:33:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sipkt-00040z-3H for qemu-devel@nongnu.org; Sun, 24 Jun 2012 12:33:44 -0400 Received: from verein.lst.de ([213.95.11.211]:44339 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sipks-00040e-TQ for qemu-devel@nongnu.org; Sun, 24 Jun 2012 12:33:43 -0400 Date: Sun, 24 Jun 2012 18:33:40 +0200 From: Christoph Hellwig Message-ID: <20120624163340.GA5727@lst.de> References: <1340319857-28198-1-git-send-email-mdroth@linux.vnet.ibm.com> <1340319857-28198-3-git-send-email-mdroth@linux.vnet.ibm.com> <20120622174856.GA6505@puku.stupidest.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120622174856.GA6505@puku.stupidest.org> Subject: Re: [Qemu-devel] [PATCH 2/2] qemu-ga: add guest-fstrim command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Wedgwood Cc: pbonzini@redhat.com, aliguori@us.ibm.com, Michael Roth , qemu-devel@nongnu.org On Fri, Jun 22, 2012 at 10:48:56AM -0700, Chris Wedgwood wrote: > > FITRIM is a mounted filesystem feature to discard (or "trim") blocks which > > are not in use by the filesystem. This is useful for solid-state drives > > (SSDs) and thinly-provisioned storage. Provide access to the feature > > from the host so that filesystems can be trimmed periodically or before > > migration. > > Why can't we use the block layer for this? AHCI (I think) already > has support, others could be added some some coordination. > > That was existing operating systems with current filesystems will DTRT > when needed. This commands calls the FITRIM command in the guest, which tells the filesystems to issue an discard for all currently unused space. At that point it enters the block layer.