Christoph,
Thanks for the quick reply.
Here's another question: If I write data to an extent that already exists, am
I also guaranteed that the new data will overwrite the same location? For
instance, will XFS ever relocate an extent on a write in order to expand the
extent?
-steve
On Mar 11, 2011, at 2:09 AM, Christoph Hellwig wrote:
> 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.
>
|