From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl Date: Thu, 29 May 2008 17:20:38 -0600 Message-ID: <20080529232038.GJ2985@webber.adilger.int> References: <20080527185622.GR8325@wotan.suse.de> <20080527203124.GC27827@mail.oracle.com> <20080528160201.GA7263@webber.adilger.int> <20080528170419.GA6031@mail.oracle.com> <20080529005134.GB12405@disturbed> <20080529130254.GB21299@infradead.org> <483ECCB5.5060909@hp.com> <20080529185616.GA2655@mail.oracle.com> <20080529214123.GH2985@webber.adilger.int> <20080529214743.GD2655@mail.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7BIT Cc: jim owens , Christoph Hellwig , Mark Fasheh , linux-fsdevel@vger.kernel.org To: Joel Becker Return-path: Received: from sca-es-mail-2.Sun.COM ([192.18.43.133]:57996 "EHLO sca-es-mail-2.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752891AbYE2XUl (ORCPT ); Thu, 29 May 2008 19:20:41 -0400 Received: from fe-sfbay-10.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m4TNKe64001777 for ; Thu, 29 May 2008 16:20:40 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-10.sun.com by fe-sfbay-10.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K1N00I01KMQNA00@fe-sfbay-10.sun.com> (original mail from adilger@sun.com) for linux-fsdevel@vger.kernel.org; Thu, 29 May 2008 16:20:40 -0700 (PDT) In-reply-to: <20080529214743.GD2655@mail.oracle.com> Content-disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On May 29, 2008 14:47 -0700, Joel Becker wrote: > On Thu, May 29, 2008 at 03:41:23PM -0600, Andreas Dilger wrote: > > So, to clarify, you are suggesting that FIEMAP_FLAG_NUM_EXTENTS isn't > > needed, and returning the extent count should just be detected by calling > > FIEMAP with fm_extent_count == 0? I'm OK with that also, since calling > > it with fm_extent_count == 0 doesn't make sense otherwise. > > I'd always set fm_extent_count to whatever covers the range. > So, like snprintf(3), you always know when you were truncated and by how > much. Then, passing fm_extent_count=0 in is just a special case of it. > Like estimating a printf buffer with len = snprintf(NULL, 0, fmt, ...); I totally agree, I just didn't remember to include the start/end range in my email, though I think they are necessary. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc.