Re: [RFD] : Allowing xfs_fsr to defragment portions of a file

Dhruvesh Rathore
2015-02-25T15:23:41Z

the donor file
of e4defrag.c.
We were a bit unsure about the function of join_extents() in
e4defrag.c, which finds a
continuous region (extents group), and how it will fit in the XFS API.
Is it similar to the process of preallocating extents[toff, tlen] in temp file ?

3) Now instead of copying data from [orig, off, len] to [temp, toff,
tlen] and then calling
XFS_IOC_SWPEXT, we will need to simulate the ioctl EXT4_IOC_MOVE_EXT.

In call_defrag( ) in e4defrag.c, the struct fiemap_extent_list
structure, which is basically
a link list of extent information is used.
In our XFS API we will similarly use this structure in a loop and call
the IOCTL for
each of the extents (off donor file) which need to be filled by