Mails sent to the XFS mailing list

Somdeep Dey somdeepdey10 at gmail.com
Mon Feb 16 08:20:50 CST 2015


Hi Dave,

We have sent a RFD mail on the mailing list about the current task that we
are doing: defragmenting parts of a file. (Haven't got a response yet)

http://oss.sgi.com/archives/xfs/2015-02/msg00264.html

We were actually stuck on a logical aspect, of how to go ahead performing
defragmentation without creating a temporary file, and then copy extents to it.

-----------------------------------------------------------------------------------------------------

File: fsr/xfs_fsr.c

In fsr/xfs_fsr.c code , we also had a doubt about how to modify the number of
extents for the temp file getting created.

Line 1321 onwards:
It would be of great help if u could shed some light on the ioctl's -
XFS_IOC_UNRESVSP64 and XFS_IOC_RESVSP64,

We took a test case where a file had 3 extents. The for loop at line 1321 now
had nextents value as 1 (i.e ideal extent count 1) and
outmap[extent].bmv_length was addition of all blocks, i.e. outmap[ ] array had
one index (for 1 ideal extent)

After that we tried running a defragmentation test, by making read_fd_bmap()
function return nextents value as 2, and subsequently made outmap[ ] have
two entries instead of one.

However the temp file that got created (Line 1321 onwards) still had
new_nextents
as 1 (Line 1382) instead of having 2.
Any thoughts ? :)

Regards,
A-DRS



More information about the xfs mailing list