@@ -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.
@@ -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 */
@@ -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 */
Perform simple tests of the realtime bitmap and summary. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- libxfs/xfs_format.h | 5 +++++ libxfs/xfs_fs.h | 4 +++- libxfs/xfs_rtbitmap.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)