From: Brad Boyer Subject: Re: [RFC][PATCH 0/5] Fiemap, an extent mapping ioctl Date: Sun, 25 May 2008 13:59:27 -0700 Message-ID: <20080525205926.GA24479@cynthia.pants.nu> References: <20080525000148.GJ8325@wotan.suse.de> <20080525194203.GB24328@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Mark Fasheh , linux-fsdevel@vger.kernel.org, Andreas Dilger , Kalpak Shah , Eric Sandeen , Josef Bacik To: Christoph Hellwig Return-path: Received: from adsl-76-245-85-235.dsl.pltn13.sbcglobal.net ([76.245.85.235]:40804 "EHLO cynthia.pants.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbYEZB4q (ORCPT ); Sun, 25 May 2008 21:56:46 -0400 Content-Disposition: inline In-Reply-To: <20080525194203.GB24328@infradead.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Sun, May 25, 2008 at 03:42:03PM -0400, Christoph Hellwig wrote: > > * FIEMAP_FLAG_LUN_ORDER > > If the file system stripes file data, this will return contiguous > > regions of physical allocation, sorted by LUN. Logical offsets may not > > make sense if this flag is passed. If the file system does not support > > multiple LUNs, this flag will be ignored. > > A LUN doesn't make any sense in filesystem context. That's a > scsi-centric acronym that doesn't even make sense in a scsi-centric > filesystem universe because a LUN can of course contain multiple > partitions. It's also extremly ill-defined when using volume managers. > > There's also no filesystems that actually support a single file on > multiple device in mainline, the only filesystem that supports multiple > data devices at all (XFS) requires each file to be on a single device. > > Once we have a filesystem with real multiple data device support like > btrfs or a future XFS version we can worry about this and defined > a different ioctl for it. > > > > > Each extent is described by a single fiemap_extent structure as > > returned in fm_extents. > > > > struct fiemap_extent { > > __u64 fe_logical;/* logical offset in bytes for the start of > > * the extent */ > > __u64 fe_physical; /* physical offset in bytes for the start > > * of the extent */ > > __u64 fe_length; /* length in bytes for the extent */ > > __u32 fe_flags; /* returned FIEMAP_EXTENT_* flags for the extent */ > > __u32 fe_lun; /* logical device number for extent (starting at 0)*/ > > Again this lun thing is horribly ill-defined. There is no such thing > as a logic device number in our filesystem terminology. The vxfs filesystem is capable of having each extent in a file on a different device. However, I don't think freevxfs supports that. I do agree that calling each one a "lun" is not really meaningful. Brad Boyer flar@allandria.com