Thread (45 messages) read the whole thread 45 messages, 9 authors, 2007-10-30

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

From: Mark Fasheh <hidden>
Date: 2007-10-29 22:40:11
Also in: linux-fsdevel, linux-xfs, ocfs2-devel

On Mon, Oct 29, 2007 at 04:29:07PM -0600, Andreas Dilger wrote:
On Oct 29, 2007  16:13 -0600, Andreas Dilger wrote:
quoted
On Oct 29, 2007  13:57 -0700, Mark Fasheh wrote:
quoted
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 mapping for the extent that
contains the specified logical byte address." Which seems to imply physical,
but your math to get to the next logical start in a very fragmented file,
implies that fe_offset is a logical offset:

       fm_start = fm_extents[fm_extent_count - 1].fe_offset +
                         fm_extents[fm_extent_count - 1].fe_length + 1; 
Note the distinction between "fe_offset" (which is a physical offset for
a single extent) and "fm_offset" (which is a logical offset for that file).
Actually, that is completely bunk.  What it should say is something like:
"filefrag can easily call the FIEMAP ioctls repeatedly using the returned
fm_start and fm_length as the start offset for the next ioctl:

        fiemap.fm_start = fiemap.fm_start + fiemap.fm_length + 1;
Yeah - that's where I was going with my question. This is much more clear
now, thanks.
	--Mark

--
Mark Fasheh
Senior Software Developer, Oracle
mark.fasheh@oracle.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help