From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH 0/4] Fiemap, an extent mapping ioctl - round 2 Date: Thu, 26 Jun 2008 23:16:00 +1000 Message-ID: <20080626131600.GS29319@disturbed> References: <20080625221835.GQ28100@wotan.suse.de> <20080626093634.GA30025@shareable.org> <20080626102403.GN6239@webber.adilger.int> <20080626121950.GB32417@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andreas Dilger , Mark Fasheh , linux-fsdevel@vger.kernel.org, Andreas Dilger , Kalpak Shah , Eric Sandeen , Josef Bacik To: Jamie Lokier Return-path: Received: from ipmail01.adl6.internode.on.net ([203.16.214.146]:19598 "EHLO ipmail01.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750997AbYFZNQF (ORCPT ); Thu, 26 Jun 2008 09:16:05 -0400 Content-Disposition: inline In-Reply-To: <20080626121950.GB32417@shareable.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jun 26, 2008 at 01:19:51PM +0100, Jamie Lokier wrote: > Andreas Dilger wrote: > > > Is there a reason why fsync() before calling FIEMAP is unsuitable? > > > > This was added because the xfsbmap operation always did an fsync before > > returning the extents. I don't think it is strictly required, but it > > isn't harmful either. > > It's not harmful but suggests it might do something important - > e.g. provide atomicity between the fsync and getting extends. It does precisely that. > > > > * FIEMAP_FLAG_XATTR > > > > If this flag is set, the extents returned will describe the inodes > > > > extended attribute lookup tree, instead of it's data tree. > > > > > > What is this for? The meaning of the xattr tree sounds rather > > > filesystem specific to me. > > > > This is to return the location of the xattr blocks for the inode. > > Some filesystems will store xattrs as metadata - in exactly the same > as, say, the inode itself, it's permissions, mappings etc. > > I'm not sure why xattrs get special treatment, compared with a > hypothetical FIEMAP_FLAG_METADATA for example, indicating which > physical blocks contain the inode itself, or it's other auxiliary > information. Because xattrs tend to contain user data, not metadata? Cheers, Dave. -- Dave Chinner david@fromorbit.com