The XFS file-system has some interesting new feature work and performance tuning with the Linux 7.0 kernel that will be used by the likes of Fedora 44 and Ubuntu 26.04 LTS this spring.
First up is a new autonomous self-healing capability being introduced with XFS in Linux 7.0. This health monitoring feature is described by Darrick Wong in its patch series as:
“This patchset builds new functionality to deliver live information about filesystem health events to userspace. This is done by creating an anonymous file that can be read() for events by userspace programs. Events are captured by hooking various parts of XFS and iomap so that metadata health failures, file I/O errors, and major changes in filesystem state (unmounts, shutdowns, etc.) can be observed by programs.
When an event occurs, the hook functions queue an event object to each event anonfd for later processing. Programs must have CAP_SYS_ADMIN to open the anonfd and there’s a maximum event lag to prevent resource overconsumption. The events themselves can be read() from the anonfd as C structs for the xfs_healer daemon.
In userspace, we create a new daemon program that will read the event objects and initiate repairs automatically. This daemon is managed entirely by systemd and will not block unmounting of the filesystem unless repairs are ongoing. They are auto-started by a starter service that uses fanotify.”
This XFS feature depends upon the generic I/O error reporting to user-space “fserror” infrastructure merged a few days ago. He ended the autonomous self-healing pull request with, “With a bit of luck, this should all go splendidly.”
Another noteworthy XFS change is performance improvements for parent pointers. XFS parent pointers are used for storing backlinks in a file’s extended attributes for its parent directory and filename, which can then be used during online fsck and related operations. Darrick Wong explained with this patch for speeding up parent pointer operations:
“Parent pointers increase the system time by 28% overhead to create 32 million files that are totally empty. Removing them incurs a system time increase of 56%. Wall time increases by 9% and 22%.
…
Now parent pointers only increase the system time by 8% for creation and 19% for deletion. Wall time increases by 5% and 9% now.Close the performance gap by creating helpers for the attr set, remove, and replace operations that will try to make direct shortform updates, and fall back to the attr intent machinery if that doesn’t work. We can use the same helpers for regular xattrs and parent pointers.”
The XFS pull also includes improvements to the journaling code, code refactoring, and various bug fixes. This code was successfully merged for Linux 7.0.
