* Does XFS ever relocate extents after they are on disk?
@ 2011-03-11 7:55 Steven Swanson
2011-03-11 10:09 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Steven Swanson @ 2011-03-11 7:55 UTC (permalink / raw)
To: xfs
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.
Thanks!
-steve
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does XFS ever relocate extents after they are on disk?
2011-03-11 7:55 Does XFS ever relocate extents after they are on disk? Steven Swanson
@ 2011-03-11 10:09 ` Christoph Hellwig
2011-03-11 22:29 ` Steven Swanson
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2011-03-11 10:09 UTC (permalink / raw)
To: Steven Swanson; +Cc: xfs
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.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does XFS ever relocate extents after they are on disk?
2011-03-11 10:09 ` Christoph Hellwig
@ 2011-03-11 22:29 ` Steven Swanson
2011-03-14 10:36 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Steven Swanson @ 2011-03-11 22:29 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs
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.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Does XFS ever relocate extents after they are on disk?
2011-03-11 22:29 ` Steven Swanson
@ 2011-03-14 10:36 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2011-03-14 10:36 UTC (permalink / raw)
To: Steven Swanson; +Cc: xfs
On Fri, Mar 11, 2011 at 02:29:30PM -0800, Steven Swanson wrote:
> 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?
Right now it won't. I wouldn't call that a guaranteed though - e.g. if
we're ever going to finish off storig file data in the inode for small
files we'll have to migrate them out of the inode once we create the
first extent.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-14 10:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-11 7:55 Does XFS ever relocate extents after they are on disk? Steven Swanson
2011-03-11 10:09 ` Christoph Hellwig
2011-03-11 22:29 ` Steven Swanson
2011-03-14 10:36 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox