From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Becker Subject: Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl Date: Wed, 28 May 2008 10:04:19 -0700 Message-ID: <20080528170419.GA6031@mail.oracle.com> References: <20080525000148.GJ8325@wotan.suse.de> <20080525194203.GB24328@infradead.org> <20080527185622.GR8325@wotan.suse.de> <20080527203124.GC27827@mail.oracle.com> <20080528160201.GA7263@webber.adilger.int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mark Fasheh , Christoph Hellwig , linux-fsdevel@vger.kernel.org, Andreas Dilger , Kalpak Shah , Eric Sandeen , Josef Bacik To: Andreas Dilger Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:25389 "EHLO agminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751689AbYE1RGG (ORCPT ); Wed, 28 May 2008 13:06:06 -0400 Content-Disposition: inline In-Reply-To: <20080528160201.GA7263@webber.adilger.int> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, May 28, 2008 at 10:02:01AM -0600, Andreas Dilger wrote: > On May 27, 2008 13:31 -0700, Joel Becker wrote: > > Provide generic_fiemap_fiecount() that does the operation in > > terms of ->fiemap(). Then filesystems like ocfs2 can just do .fiecount > > = generic_fiemap_fiecount. > > I agree with Christoph that it seems a bit overloaded when done > > as a special case of FIEMAP. > > The question is whether there are any (or many) filesystems that will NOT > implement ->fiecount() as a wrapper of ->fiemap()? At that point the > "simplification" of the API means that there is actually more code and > layers being called for the simple version. > > I'm not saying I'm against having a FIECOUNT ioctl, we're probably just > going to use an updated filefrag like everyone else, but it doesn't seem > like a net reduction in code anywhere. It's not about net reduction of code. It's about a readable and understandable interface. "Pass this array of extent structures we'll ignore if you set this special flag" is pretty ugly. Calling FIECOUNT separately is nice. How it is implemented in the kernel is a whole 'nother ball of wax - maybe we don't have ->fiecount() and always implement FIECOUNT in terms of a ->fiemap() walk. Doesn't matter. Joel -- "Hey mister if you're gonna walk on water, Could you drop a line my way?" Joel Becker Principal Software Developer Oracle E-mail: joel.becker@oracle.com Phone: (650) 506-8127