xfs
[Top] [All Lists]

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

To: Steven Swanson <swanson@xxxxxxxxxxx>
Subject: Re: Does XFS ever relocate extents after they are on disk?
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 11 Mar 2011 05:09:36 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <903E14DC-D9EA-4BDC-8D43-FBB9AB4127BC@xxxxxxxxxxx>
References: <903E14DC-D9EA-4BDC-8D43-FBB9AB4127BC@xxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
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>