From: Darrick J. Wong Date: Sun, 22 Feb 2026 22:41:03 +0000 (-0800) Subject: xfs: start creating infrastructure for health monitoring X-Git-Tag: v7.0.0~95 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1f2281c598735d55194ca53e97f44e1abc72ace;p=xfsprogs-dev.git xfs: start creating infrastructure for health monitoring Source kernel commit: a48373e7d35a89f6f9b39f0d0da9bf158af054ee Start creating helper functions and infrastructure to pass filesystem health events to a health monitoring file. Since this is an administrative interface, we only support a single health monitor process per filesystem, so we don't need to use anything fancy such as notifier chains (== tons of indirect calls). Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 12463ba7..c58e55b3 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -1003,6 +1003,12 @@ struct xfs_rtgroup_geometry { #define XFS_RTGROUP_GEOM_SICK_RMAPBT (1U << 3) /* reverse mappings */ #define XFS_RTGROUP_GEOM_SICK_REFCNTBT (1U << 4) /* reference counts */ +struct xfs_health_monitor { + __u64 flags; /* flags */ + __u8 format; /* output format */ + __u8 pad[23]; /* zeroes */ +}; + /* * ioctl commands that are used by Linux filesystems */ @@ -1042,6 +1048,7 @@ struct xfs_rtgroup_geometry { #define XFS_IOC_GETPARENTS_BY_HANDLE _IOWR('X', 63, struct xfs_getparents_by_handle) #define XFS_IOC_SCRUBV_METADATA _IOWR('X', 64, struct xfs_scrub_vec_head) #define XFS_IOC_RTGROUP_GEOMETRY _IOWR('X', 65, struct xfs_rtgroup_geometry) +#define XFS_IOC_HEALTH_MONITOR _IOW ('X', 68, struct xfs_health_monitor) /* * ioctl commands that replace IRIX syssgi()'s