All of lore.kernel.org
 help / color / mirror / Atom feed
* XFS fiemap issue with Linux 3.10.0-327.el7.x86_64 (CentOS 7)
@ 2016-02-15 17:26 Jim Wilcoxson
  2016-02-15 18:33 ` Eric Sandeen
  0 siblings, 1 reply; 7+ messages in thread
From: Jim Wilcoxson @ 2016-02-15 17:26 UTC (permalink / raw)
  To: xfs

I'm developing a backup program, HashBackup, and recently added sparse
"hole skipping" using fiemap.  Today I ran into a weird issue with xfs
on Linux 3.10.

A test program creates a sparse file with 10000*(4K data, 4M hole).
HB calls fiemap with start=0, length=0xFFFF...FFFF, mapped_extents=0
to get the number of extents.    Fiemap is coming back with
mapped_extents=1364 instead of 10000.

The fiemap.txt file says:

"If fm_extent_count is zero, then the fm_extents[] array is ignored
(no extents will be returned), and the fm_mapped_extents count will
hold the number of extents needed in fm_extents[] to hold the file's
current mapping."

It doesn't say the filesystem can choose to return fewer extents if it
wants, but maybe xfs interprets it this way and fiemap has to be
called in a loop until the extent_last flag is set.  If that's the
case, fiemap.txt should be updated.

Thanks,
Jim
(not on the xfs mailing list)
-- 
HashBackup: easy onsite and offsite Unix backup
http://www.hashbackup.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-16  0:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-15 17:26 XFS fiemap issue with Linux 3.10.0-327.el7.x86_64 (CentOS 7) Jim Wilcoxson
2016-02-15 18:33 ` Eric Sandeen
2016-02-15 19:28   ` Jim Wilcoxson
2016-02-15 20:40     ` Dave Chinner
2016-02-15 22:47       ` Eric Sandeen
2016-02-16  0:20         ` Dave Chinner
2016-02-16  0:23           ` Eric Sandeen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.