[Top] [All Lists]

Re: Does XFS ever relocate extents after they are on disk?

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: Does XFS ever relocate extents after they are on disk?
From: Steven Swanson <swanson@xxxxxxxxxxx>
Date: Fri, 11 Mar 2011 14:29:30 -0800
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110311100936.GA11879@xxxxxxxxxxxxx>
References: <903E14DC-D9EA-4BDC-8D43-FBB9AB4127BC@xxxxxxxxxxx> <20110311100936.GA11879@xxxxxxxxxxxxx>

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 


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.

<Prev in Thread] Current Thread [Next in Thread>