Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Mark Fasheh
Hi Andreas, Thanks for posting this. I believe that an interface such as FIEMAP would be very useful to Ocfs2 as well. (I added ocfs2-devel to the e-mail) My comments below are generally geared towards understanding the ioctl interface. On Mon, Oct 29, 2007 at 01:45:07PM -0600, Andreas

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Andreas Dilger
By request on #linuxfs, here is the FIEMAP spec that we used to implement the FIEMAP support for ext4. There was an ext4 patch posted on August 29 to linux-ext4 entitled [PATCH] FIEMAP ioctl. I've asked Kalpak to post an updated version of that patch along with the changes to the filefrag tool

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Andreas Dilger
On Oct 29, 2007 16:13 -0600, Andreas Dilger wrote: On Oct 29, 2007 13:57 -0700, Mark Fasheh wrote: I'm a little bit confused by fe_offset. Is it a physical offset, or a logical offset? The reason I ask is that your description above says FIEMAP ioctl will return the logical to physical

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Mark Fasheh
On Mon, Oct 29, 2007 at 04:29:07PM -0600, Andreas Dilger wrote: On Oct 29, 2007 16:13 -0600, Andreas Dilger wrote: On Oct 29, 2007 13:57 -0700, Mark Fasheh wrote: I'm a little bit confused by fe_offset. Is it a physical offset, or a logical offset? The reason I ask is that your

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread David Chinner
On Mon, Oct 29, 2007 at 01:45:07PM -0600, Andreas Dilger wrote: By request on #linuxfs, here is the FIEMAP spec that we used to implement the FIEMAP support for ext4. There was an ext4 patch posted on August 29 to linux-ext4 entitled [PATCH] FIEMAP ioctl. Link:

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Andreas Dilger
On Oct 29, 2007 13:57 -0700, Mark Fasheh wrote: Thanks for posting this. I believe that an interface such as FIEMAP would be very useful to Ocfs2 as well. (I added ocfs2-devel to the e-mail) I tried to make it as Lustre-agnostic as possible... On Mon, Oct 29, 2007 at 01:45:07PM -0600,

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Andreas Dilger
On Oct 29, 2007 17:11 -0700, Mark Fasheh wrote: On Mon, Oct 29, 2007 at 04:13:02PM -0600, Andreas Dilger wrote: Btrfs, Ocfs2, and Gfs2 pack small amounts of user data directly in inode blocks. Hmm, but part of the issue would be how to request the extra data, and what offset it

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-10-29 Thread Mark Fasheh
On Mon, Oct 29, 2007 at 04:13:02PM -0600, Andreas Dilger wrote: On Oct 29, 2007 13:57 -0700, Mark Fasheh wrote: Thanks for posting this. I believe that an interface such as FIEMAP would be very useful to Ocfs2 as well. (I added ocfs2-devel to the e-mail) I tried to make it as

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-03 Thread Andreas Dilger
On May 02, 2007 20:57 +1000, David Chinner wrote: On Wed, May 02, 2007 at 10:36:12AM +0100, Anton Altaparmakov wrote: HSM_READ is definitely _NOT_ required because all it means is if the file is OFFLINE, bring it ONLINE and then return the extent map. You've got the definition of

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-03 Thread Anton Altaparmakov
On 3 May 2007, at 08:49, Andreas Dilger wrote: On May 02, 2007 20:57 +1000, David Chinner wrote: On Wed, May 02, 2007 at 10:36:12AM +0100, Anton Altaparmakov wrote: HSM_READ is definitely _NOT_ required because all it means is if the file is OFFLINE, bring it ONLINE and then return the

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-02 Thread Anton Altaparmakov
On 2 May 2007, at 01:06, David Chinner wrote: On Tue, May 01, 2007 at 07:37:20PM +0100, Anton Altaparmakov wrote: On 1 May 2007, at 05:22, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: The FIBMAP ioctl is for privileged users only, and I wonder if

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-02 Thread David Chinner
On Tue, May 01, 2007 at 07:46:53PM +0100, Anton Altaparmakov wrote: On 1 May 2007, at 15:20, David Chinner wrote: So, either the filesystem will understand the flag or iff the unknown flag is in the incompat set, it will return EINVAL or else the unknown flag will be safely ignored.

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-01 Thread Anton Altaparmakov
On 1 May 2007, at 15:20, David Chinner wrote: On Mon, Apr 30, 2007 at 09:39:06PM -0700, Nicholas Miell wrote: On Tue, 2007-05-01 at 14:22 +1000, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: This is actually for future use. Any flags that are added into

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-05-01 Thread David Chinner
On Tue, May 01, 2007 at 03:30:40PM -0700, Andreas Dilger wrote: On May 01, 2007 14:22 +1000, David Chinner wrote: On Mon, Apr 30, 2007 at 04:44:01PM -0600, Andreas Dilger wrote: Hmm, I'd thought offline would migrate to EXTENT_UNKNOWN, but I didn't I disagree - why would you want to

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-19 Thread Timothy Shimmin
--On 18 April 2007 6:21:39 PM -0600 Andreas Dilger [EMAIL PROTECTED] wrote: Below is an aggregation of the comments in this thread: struct fiemap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len; /* length in bytes */ __u32

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-18 Thread Andreas Dilger
On Apr 16, 2007 18:01 +1000, Timothy Shimmin wrote: --On 12 April 2007 5:05:50 AM -0600 Andreas Dilger [EMAIL PROTECTED] wrote: struct fiemap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len; /* length in bytes */ } struct

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-18 Thread Andreas Dilger
On Apr 16, 2007 21:22 +1000, David Chinner wrote: On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: struct fiemap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len; /* length in bytes */ } struct fiemap {

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-16 Thread Timothy Shimmin
Hi Andreas, --On 12 April 2007 5:05:50 AM -0600 Andreas Dilger [EMAIL PROTECTED] wrote: I'm interested in getting input for implementing an ioctl to efficiently map file extents holes (FIEMAP) instead of looping over FIBMAP a billion times. ... I had come up with a plan independently and

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-13 Thread Christoph Hellwig
On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: struct fibmap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len; /* length in bytes */ } struct fibmap { struct fibmap_extent fm_start; /* offset, length

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-13 Thread Anton Altaparmakov
On 13 Apr 2007, at 11:15, Christoph Hellwig wrote: On Thu, Apr 12, 2007 at 05:05:50AM -0600, Andreas Dilger wrote: struct fibmap_extent { __u64 fe_start; /* starting offset in bytes */ __u64 fe_len; /* length in bytes */ } struct fibmap {

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-13 Thread Nicholas Miell
On Fri, 2007-04-13 at 12:38 +0100, Anton Altaparmakov wrote: One addition freature from the XFS getbmapx interface we should provide is the ability to query layout of xattrs. While other filesystems might not have the exact xattr fork XFS has it fits nicely into the interface. Especially

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-12 Thread Anton Altaparmakov
Hi Andreas, On 12 Apr 2007, at 12:05, Andreas Dilger wrote: I'm interested in getting input for implementing an ioctl to efficiently map file extents holes (FIEMAP) instead of looping over FIBMAP a billion times. We already have customers with single files in the 10TB range and we

Re: [RFC] add FIEMAP ioctl to efficiently map file allocation

2007-04-12 Thread Andreas Dilger
On Apr 12, 2007 12:22 +0100, Anton Altaparmakov wrote: On 12 Apr 2007, at 12:05, Andreas Dilger wrote: I'm interested in getting input for implementing an ioctl to efficiently map file extents holes (FIEMAP) instead of looping over FIBMAP a billion times. We already have customers with