From 1da1b67812ecc7c95a41c9365198589d2777b6c5 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 16 Nov 2017 22:11:32 -0600 Subject: [PATCH] xfs: scrub realtime bitmap/summary Source kernel commit: 29b0767b8beb4c5e3fd94656d51413a4fe8d2d74 Perform simple tests of the realtime bitmap and summary. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Eric Sandeen --- libxfs/xfs_format.h | 5 +++++ libxfs/xfs_fs.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index 83adc1608..2a39685b3 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -315,6 +315,11 @@ static inline bool xfs_sb_good_version(struct xfs_sb *sbp) return false; } +static inline bool xfs_sb_version_hasrealtime(struct xfs_sb *sbp) +{ + return sbp->sb_rblocks > 0; +} + /* * Detect a mismatched features2 field. Older kernels read/wrote * this into the wrong slot, so to be safe we keep them in sync. diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index a3dd1a5ed..115ae4b09 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -523,9 +523,11 @@ struct xfs_scrub_metadata { #define XFS_SCRUB_TYPE_XATTR 16 /* extended attribute */ #define XFS_SCRUB_TYPE_SYMLINK 17 /* symbolic link */ #define XFS_SCRUB_TYPE_PARENT 18 /* parent pointers */ +#define XFS_SCRUB_TYPE_RTBITMAP 19 /* realtime bitmap */ +#define XFS_SCRUB_TYPE_RTSUM 20 /* realtime summary */ /* Number of scrub subcommands. */ -#define XFS_SCRUB_TYPE_NR 19 +#define XFS_SCRUB_TYPE_NR 21 /* i: Repair this metadata. */ #define XFS_SCRUB_IFLAG_REPAIR (1 << 0) -- 2.47.2