Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754698Ab0KSOyr (ORCPT ); Fri, 19 Nov 2010 09:54:47 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:39413 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753548Ab0KSOyq (ORCPT ); Fri, 19 Nov 2010 09:54:46 -0500 Date: Fri, 19 Nov 2010 09:54:24 -0500 From: Christoph Hellwig To: Mark Lord Cc: Christoph Hellwig , Greg Freemyer , "Martin K. Petersen" , James Bottomley , Jeff Moyer , Matthew Wilcox , Josef Bacik , Lukas Czerner , tytso@mit.edu, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, sandeen@redhat.com Subject: Re: [PATCH 1/2] fs: Do not dispatch FITRIM through separate super_operation Message-ID: <20101119145423.GA27919@infradead.org> References: <1290102098.3041.77.camel@mulgrave.site> <4CE59E57.2090009@teksavvy.com> <4CE5C616.7070706@teksavvy.com> <20101119115516.GA1152@infradead.org> <4CE6831E.4020606@teksavvy.com> <20101119140639.GA25488@infradead.org> <4CE68E2C.9070101@teksavvy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CE68E2C.9070101@teksavvy.com> 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: 1242 Lines: 24 On Fri, Nov 19, 2010 at 09:48:12AM -0500, Mark Lord wrote: > I'm not sure about the issues on "adapting the block layer" ? > For FITRIM, the blocks being trimmed would be reserved at the fs level, > before issuing the discard for them. So ordering through the block layer > shouldn't matter much for it. Does that simplify things? > > I see FITRIM just allocating a page to hold the ranges (for the >1 case) > and passing that page down through the layers to libata (or any other > LLD that supports >1 ranges). Ordering should not be an issue. What were problems when I tried this before is that we currently assume in the block layer that discard bios have a valid bi_sector/bi_size, which is already needed e.g. for the trivial remapping use for partitions and that they don't have a payload. You'd need to teach various places that discard payloads may have a payload, which contains multiple ranges that have a sector/len tuple that needs to be remapped and checked in various places. -- 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/