From: Darrick J. Wong Date: Fri, 17 Nov 2017 04:11:32 +0000 (-0600) Subject: xfs: scrub realtime bitmap/summary X-Git-Tag: v4.15.0-rc1~143^2~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1da1b67812ecc7c95a41c9365198589d2777b6c5;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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)