summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs
diff options
context:
space:
mode:
authorDarrick J. Wong2017-10-18 06:37:46 +0200
committerDarrick J. Wong2017-10-27 00:38:26 +0200
commit29b0767b8beb4c5e3fd94656d51413a4fe8d2d74 (patch)
tree0a1ceb60fe3073bae58d052f3a998b4095f668d0 /fs/xfs/libxfs
parentxfs: scrub directory parent pointers (diff)
downloadkernel-qcow2-linux-29b0767b8beb4c5e3fd94656d51413a4fe8d2d74.tar.gz
kernel-qcow2-linux-29b0767b8beb4c5e3fd94656d51413a4fe8d2d74.tar.xz
kernel-qcow2-linux-29b0767b8beb4c5e3fd94656d51413a4fe8d2d74.zip
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.h5
-rw-r--r--fs/xfs/libxfs/xfs_fs.h4
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)