[PATCHBOMB v9] xfsprogs: autonomous self healing of filesystems

Darrick J. Wong
2026-03-10T03:38:47Z

Hi all,

This patchset contains the userspace and QA changes (xfs_healer) needed
to put to use all the new kernel functionality to deliver live
information about filesystem health events (xfs_healthmon.c) to
userspace.

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.

When the patchsets under this cover letter are merged, online fsck for
XFS will at long last be fully feature complete. The passive scan parts
have been done since mid-2024, this final part adds proactive repair.

These patches still need some review, please help if you can. I will
get to the RWF_WRITETHOUGH series tomorrow.

[PATCHSET v9] xfsprogs: autonomous self healing of filesystems
[PATCH 03/28] libfrog: add support code for starting systemd services
[PATCH 05/28] libfrog: add wrappers for listmount and statmount
[PATCH 13/28] xfs_healer: create a per-mount background monitoring
[PATCH 14/28] xfs_healer: create a service to start the per-mount
[PATCH 19/28] xfs_healer: use statmount to find moved filesystems
[PATCH 20/28] xfs_healer: validate that repair fds point to the
[PATCH 22/28] xfs_scrub: use the verify media ioctl during phase 6 if
[PATCH 24/28] xfs_scrub: print systemd service names
[PATCH 25/28] xfs_io: add listmount and statmount commands
[PATCH 26/28] mkfs: enable online repair if all backrefs are enabled
[PATCH 27/28] debian/control: listify the build dependencies
[PATCH 28/28] debian: enable xfs_healer on the root filesystem by
[PATCHSET v9 1/2] fstests: test generic file IO error reporting
[PATCH 1/1] generic: test fsnotify filesystem error reporting
[PATCHSET v9 2/2] fstests: autonomous self healing of filesystems
[PATCH 01/14] xfs: test health monitoring code
[PATCH 02/14] xfs: test for metadata corruption error reporting via
[PATCH 03/14] xfs: test io error reporting via healthmon
[PATCH 04/14] xfs: set up common code for testing xfs_healer
[PATCH 05/14] xfs: test xfs_healer's event handling
[PATCH 06/14] xfs: test xfs_healer can fix a filesystem
[PATCH 07/14] xfs: test xfs_healer can report file I/O errors
[PATCH 08/14] xfs: test xfs_healer can report file media errors
[PATCH 09/14] xfs: test xfs_healer can report filesystem shutdowns
[PATCH 10/14] xfs: test xfs_healer can initiate full filesystem
[PATCH 11/14] xfs: test xfs_healer can follow mount moves
[PATCH 12/14] xfs: test xfs_healer wont repair the wrong filesystem
[PATCH 13/14] xfs: test xfs_healer background service
[PATCH 14/14] xfs: test xfs_healer startup service

v9: reorg listmount/statmount, use it to find moved mounts, improve the
commit messages and documentation
v8: clean up userspace for merging now that the kernel part is upstream
v7: more cleanups of the media verification ioctl, improve comments, and
reuse the bio
v6: fix pi-breaking bugs, make verify failures trigger health reports
and filter bio status flags better
v5: add verify-media ioctl, collapse small helper funcs with only
one caller
v4: drop multiple client support so we can make direct calls into
healthmon instead of chasing pointers and doing indirect calls
v3: drag out of rfc status

--D