mirror-linux/tools
Carlos Maiolino 04a65666a6 xfs: autonomous self healing of filesystems [v7]
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 patchset depends on the new fserror code that Christian Brauner
 has tentatively accepted for Linux 7.0:
 https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs-7.0.fserror
 
 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
 
 With a bit of luck, this should all go splendidly.
 
 Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCaXB3wQAKCRBKO3ySh0YR
 pkyzAQD/6Yuzlbc/NDUeyHOeSYYB8zAtrbw1Pdky6dtR16FR3QD/Yb5/M9E4MFz7
 IX7KeL00cF/fDFl6c3h9qaEx+w23KgA=
 =ADAl
 -----END PGP SIGNATURE-----

Merge tag 'health-monitoring-7.0_2026-01-20' of https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-7.0-merge

xfs: autonomous self healing of filesystems [v7]

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 patchset depends on the new fserror code that Christian Brauner
has tentatively accepted for Linux 7.0:
https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git/log/?h=vfs-7.0.fserror

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

With a bit of luck, this should all go splendidly.

Conflicts:
	This merge required an update on files:
		- fs/xfs/xfs_healthmon.c
		- fs/xfs/xfs_verify_media.c
	Such change was required because a parallel developement changed
	XFS header file xfs.h naming to xfs_platform.h, so the merge
	required to update those includes in both files above

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
2026-01-28 10:02:20 +01:00
..
accounting
arch xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
bootconfig
bpf bpftool: Fix build warnings due to MS extensions 2025-12-09 23:21:33 -08:00
build tools build: Fix the common set of features test wrt libopenssl 2025-12-27 20:26:44 -08:00
certs
cgroup
counter
crypto
debugging
dma dma-mapping updates for Linux 6.19: 2025-12-06 09:25:05 -08:00
docs docs: makefile: move rustdoc check to the build wrapper 2025-11-29 08:42:53 -07:00
firewire
firmware
gpio
hv
iio
include xfs: autonomous self healing of filesystems [v7] 2026-01-28 10:02:20 +01:00
kvm/kvm_stat
laptop
leds
lib bpf-fixes 2025-12-17 15:54:58 +12:00
memory-model
mm tools/mm/page_owner_sort: fix timestamp comparison for stable sorting 2025-12-23 11:23:14 -08:00
net tools: ynl: render event op docs correctly 2026-01-13 11:56:36 -08:00
objtool objtool: fix build failure due to missing libopcodes check 2026-01-13 11:37:51 +01:00
pcmcia
perf treewide: Update email address 2026-01-11 06:09:11 -10:00
power platform-drivers-x86 for v6.19-1 2025-12-10 06:38:17 +09:00
rcu
sched
sched_ext tools/sched_ext: update scx_show_state.py for scx_aborting change 2025-12-28 06:11:26 -10:00
scripts tools headers: Sync syscall table with kernel sources 2025-12-24 11:43:36 -08:00
sound
spi
testing Landlock fix for v6.19-rc6 2026-01-18 15:15:47 -08:00
thermal tools/thermal/thermal-engine: Fix format string bug in thermal-engine 2025-11-25 11:00:28 +01:00
time
tracing rtla updaets for v6.19: 2025-12-05 09:34:01 -08:00
usb
verification
virtio tools/virtio: add device, device_driver stubs 2025-12-24 08:02:56 -05:00
wmi
workqueue
writeback
Makefile