From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Fasheh Subject: Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl Date: Tue, 27 May 2008 13:49:39 -0700 Message-ID: <20080527204939.GS8325@wotan.suse.de> References: <20080525000148.GJ8325@wotan.suse.de> <20080525194203.GB24328@infradead.org> <20080527185622.GR8325@wotan.suse.de> <20080527203124.GC27827@mail.oracle.com> Reply-To: Mark Fasheh Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Andreas Dilger , Kalpak Shah , Eric Sandeen , Josef Bacik To: Joel Becker Return-path: Received: from mx2.suse.de ([195.135.220.15]:58698 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759501AbYE0Utl (ORCPT ); Tue, 27 May 2008 16:49:41 -0400 Content-Disposition: inline In-Reply-To: <20080527203124.GC27827@mail.oracle.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, May 27, 2008 at 01:31:24PM -0700, Joel Becker wrote: > On Tue, May 27, 2008 at 11:56:22AM -0700, Mark Fasheh wrote: > > > > If the request has the FIEMAP_FLAG_NUM_EXTENTS flag set, then calling > > > > this helper is not necessary and fi_extents_mapped can be set > > > > directly. > > > > > > Sounds like the count number of extents request should be a separate > > > ioctl and separate filesystem entry point instead of overloading FIEMAP. > > > > > > Just define a simple FIECOUNT ioctl. > > > > What about the back-end though? This is pretty transparently handled in > > fiemap_fill_next_extent() and many file systems (Ocfs2 included) would just > > have ->fiecount callbacks that are nearly identical ->fiecount to their > > ->fiemap... > > Provide generic_fiemap_fiecount() that does the operation in > terms of ->fiemap(). Then filesystems like ocfs2 can just do .fiecount > = generic_fiemap_fiecount. Right - that's essentially what I'm getting at. Some of Christophs comments later in this thread seemed geared towards implementation too, so I was just wondering... --Mark -- Mark Fasheh