XFS fiemap issue with Linux 3.10.0-327.el7.x86_64 (CentOS 7)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux