From: Darrick J. Wong <djwong@xxxxxxxxxx> Use Kent Overstreet's thread_with_file abstraction to provide a magic file from which we can read filesystem health events. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- libxfs/xfs_fs.h | 1 + libxfs/xfs_fs_staging.h | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 246c2582abbe..b9d9bc511475 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -855,6 +855,7 @@ struct xfs_scrub_metadata { #define XFS_IOC_FSGETXATTRA _IOR ('X', 45, struct fsxattr) /* XFS_IOC_SETBIOSIZE ---- deprecated 46 */ /* XFS_IOC_GETBIOSIZE ---- deprecated 47 */ +/* XFS_IOC_HEALTHMON -------- staging 48 */ #define XFS_IOC_GETBMAPX _IOWR('X', 56, struct getbmap) #define XFS_IOC_ZERO_RANGE _IOW ('X', 57, struct xfs_flock64) #define XFS_IOC_FREE_EOFBLOCKS _IOR ('X', 58, struct xfs_fs_eofblocks) diff --git a/libxfs/xfs_fs_staging.h b/libxfs/xfs_fs_staging.h index 1da182c77934..84b99816eec2 100644 --- a/libxfs/xfs_fs_staging.h +++ b/libxfs/xfs_fs_staging.h @@ -303,4 +303,14 @@ struct xfs_map_freesp { */ #define XFS_IOC_MAP_FREESP _IOWR('X', 64, struct xfs_map_freesp) +struct xfs_health_monitor { + __u64 flags; /* flags */ + __u8 format; /* output format */ + __u8 pad1[7]; /* zeroes */ + __u64 pad2[2]; /* zeroes */ +}; + +/* Monitor for health events. */ +#define XFS_IOC_HEALTH_MONITOR _IOR ('X', 48, struct xfs_health_monitor) + #endif /* __XFS_FS_STAGING_H__ */