diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-17 21:37:46 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-10-26 15:38:26 -0700 |
commit | 29b0767b8beb4c5e3fd94656d51413a4fe8d2d74 (patch) | |
tree | 0a1ceb60fe3073bae58d052f3a998b4095f668d0 /fs/xfs/libxfs | |
parent | 0f28b25731f76feda1ec71671754a2b7179ee1ef (diff) |
xfs: scrub realtime bitmap/summary
Perform simple tests of the realtime bitmap and summary.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_format.h | 5 | ||||
-rw-r--r-- | fs/xfs/libxfs/xfs_fs.h | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h index 154c3dd6499b..d4d9bef20c3a 100644 --- a/fs/xfs/libxfs/xfs_format.h +++ b/fs/xfs/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/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h index 7444094072d5..f8bac9299335 100644 --- a/fs/xfs/libxfs/xfs_fs.h +++ b/fs/xfs/libxfs/xfs_fs.h @@ -502,9 +502,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) |