]> git.ipfire.org Git - thirdparty/linux.git/commit
xfs: check if an open file is on the health monitored fs
authorDarrick J. Wong <djwong@kernel.org>
Wed, 21 Jan 2026 02:06:51 +0000 (18:06 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 21 Jan 2026 02:06:51 +0000 (18:06 -0800)
commit8b85dc4090e1c72c6d42acd823514cce67cd54fc
treebf0bf3a641b5120a37a0bad63877125967861309
parentc0e719cb36672b69a06da65ac4ec71e9a599dff5
xfs: check if an open file is on the health monitored fs

Create a new ioctl for the healthmon file that checks that a given fd
points to the same filesystem that the healthmon file is monitoring.
This allows xfs_healer to check that when it reopens a mountpoint to
perform repairs, the file that it gets matches the filesystem that
generated the corruption report.

(Note that xfs_healer doesn't maintain an open fd to a filesystem that
it's monitoring so that it doesn't pin the mount.)

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/xfs_healthmon.c