Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758173Ab0KRO3W (ORCPT ); Thu, 18 Nov 2010 09:29:22 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:34666 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757083Ab0KRO3V (ORCPT ); Thu, 18 Nov 2010 09:29:21 -0500 Date: Thu, 18 Nov 2010 09:29:18 -0500 From: Christoph Hellwig To: Matthew Wilcox Cc: Josef Bacik , Lukas Czerner , tytso@mit.edu, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@infradead.org, sandeen@redhat.com Subject: Re: [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation Message-ID: <20101118142918.GA18510@infradead.org> References: <1290065809-3976-1-git-send-email-lczerner@redhat.com> <20101118130630.GJ6178@parisc-linux.org> <20101118134804.GN5618@dhcp231-156.rdu.redhat.com> <20101118141957.GK6178@parisc-linux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101118141957.GK6178@parisc-linux.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1058 Lines: 22 On Thu, Nov 18, 2010 at 07:19:58AM -0700, Matthew Wilcox wrote: > I guess I was assuming that, on receiving a FALLOC_FL_PUNCH_HOLE, a > filesystem that was TRIM-aware would pass that information down to the > block device that it's mounted on. I strongly feel that we shouldn't > have two interfaces to do essentially the same thing. > > I guess I'm saying that you're going to have to learn about TRIM :-) Did you actually look Lukas FITRIM code (not the slight reordering here, but the original one). It's the ext4 version of the batched discard model, that is a userspace ioctl to discard free space in the filesystem. hole punching will free the blocks into the free space pool. If you do online discard it will also get discarded, but a filesystem that has online discard enabled doesn't need FITRIM. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/