The XFS filesystem could introduce autonomous self-healing capabilities in the upcoming Linux kernel 7.0. A pull request from XFS maintainer Darrick J. Wong aims to enable real-time reporting of filesystem issues for automatic repairs by userspace programs. This feature builds on new VFS error-reporting tools planned for the same kernel version.
A recent pull request submitted by XFS maintainer Darrick J. Wong proposes the addition of autonomous self-healing features to the XFS filesystem in Linux kernel 7.0. Titled “xfs: autonomous self-healing of filesystems,” the patchset targets the 7.0 merge window and leverages new VFS error-reporting tools developed by Amutable’s CTO Christian Brauner, which are also slated for inclusion in kernel 7.0.
The core of the proposal involves a kernel mechanism that generates real-time health events for detected issues, such as metadata corruption, file I/O errors, media check failures, shutdowns, and unmounts. These events are delivered via a special anonymous file descriptor, allowing userspace applications with CAP_SYS_ADMIN privileges to read them as C structures. To manage resources, events are queued internally with limits to avoid exhaustion, ensuring they do not disrupt normal filesystem operations.
Additionally, the patchset introduces a new media verification ioctl, which feeds any detected integrity problems into the same health monitoring system for consistent reporting. On the userspace side, a daemon named xfs_healer is designed to process these events and initiate repairs automatically. Managed by systemd and utilizing fanotify for startup, the daemon will only block unmounts during active repairs.
Historically, XFS error handling has relied on reactive measures, such as manual interventions with tools like xfs_repair. If merged, this system would shift toward proactive, real-time monitoring and potential automation of fixes. As of the proposal's submission, the changes remain unmerged into the mainline kernel.