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 df6518e..ed36809 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 9829a6a..fd2dd80 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -573,7 +573,9 @@ struct xfs_scrub_metadata { #define XFS_SCRUB_TYPE_BMBTD 11 /* data fork block mapping */ #define XFS_SCRUB_TYPE_BMBTA 12 /* attr fork block mapping */ #define XFS_SCRUB_TYPE_BMBTC 13 /* CoW fork block mapping */ -#define XFS_SCRUB_TYPE_MAX 13 +#define XFS_SCRUB_TYPE_RTBITMAP 14 /* realtime bitmap */ +#define XFS_SCRUB_TYPE_RTSUM 15 /* realtime summary */ +#define XFS_SCRUB_TYPE_MAX 15 #define XFS_SCRUB_FLAGS_ALL 0x0 /* no flags yet */ 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 */ _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs