On Thu, Mar 10, 2011 at 11:55:21PM -0800, Steven Swanson wrote:
> I have simple question that I'm having trouble finding a concrete answer for:
>
> Does XFS ever relocate a file or one of its extents once it's been written to
> disk? For instance, does the file system ever decide to reorganize extents
> to reduce fragmentation.
>
> I've read through all the documentation I can find, and everything points to
> using an external de-fragmentation tool, which suggests that XFS won't do it
> autonomously, but for the project we are working on it would be useful to
> know for certain when and under what conditions XFS might decide to move an
> extent that's already been written.
XFS kernel code will never move the written extents by itself. The xfs_fsr
tool can instruct the kernel to move extents by the swapext ioctl, and
it can be run through a cron job, although that is usually not required.
|