Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
(Nearly) full tickless operation in 3.10
Online defragmentation for ext4
Posted Feb 5, 2009 5:53 UTC (Thu) by dgc (subscriber, #6611)
xfs_fsr does all the data movement via direct IO in userspace
(i.e. scales extremely well). It swaps the extents atomically
if the inode has not changed between the start of the data copy
and the completion of it. Hence you can't defragment active files.
This was considered a fundamental blocker for ext4 even though
most active files never need defragmentation (think shared
libraries). Hence the ext4 patchset implements data movement inside
ext4 itself and so the kernel defrag code is much, much more complex
than the XFS swap extents ioctl. Userspace complexity is about the
same, but different APIs were required for ext4 to do it's "a bit at
a time" algorithm....
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds