Perform simple tests of the realtime bitmap and summary. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- libxfs/xfs_format.h | 5 +++++ libxfs/xfs_fs.h | 4 +++- libxfs/xfs_rtbitmap.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index d819d00..46e4794 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 2709d1f..c2275b1 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -616,7 +616,9 @@ struct xfs_scrub_metadata { #define XFS_SCRUB_TYPE_DIR 15 /* directory */ #define XFS_SCRUB_TYPE_XATTR 16 /* extended attribute */ #define XFS_SCRUB_TYPE_SYMLINK 17 /* symbolic link */ -#define XFS_SCRUB_TYPE_MAX 17 +#define XFS_SCRUB_TYPE_RTBITMAP 18 /* realtime bitmap */ +#define XFS_SCRUB_TYPE_RTSUM 19 /* realtime summary */ +#define XFS_SCRUB_TYPE_MAX 19 #define XFS_SCRUB_FLAG_REPAIR 0x1 /* i: repair this metadata */ #define XFS_SCRUB_FLAG_CORRUPT 0x2 /* o: needs repair */ diff --git a/libxfs/xfs_rtbitmap.c b/libxfs/xfs_rtbitmap.c index 36fe323..70ea975 100644 --- a/libxfs/xfs_rtbitmap.c +++ b/libxfs/xfs_rtbitmap.c @@ -65,7 +65,7 @@ const struct xfs_buf_ops xfs_rtbuf_ops = { * Get a buffer for the bitmap or summary file block specified. * The buffer is returned read and locked. */ -static int +int xfs_rtbuf_get( xfs_mount_t *mp, /* file system mount structure */ xfs_trans_t *tp, /* transaction pointer */ -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html