]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: scrub realtime bitmap/summary
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 17 Nov 2017 04:11:32 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:32 +0000 (22:11 -0600)
Source kernel commit: 29b0767b8beb4c5e3fd94656d51413a4fe8d2d74

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_format.h
libxfs/xfs_fs.h

index 83adc1608823f1d9c0d510fcb01d0bee52f45def..2a39685b3fb1703868b1ffbb21ec50162e612459 100644 (file)
@@ -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.
index a3dd1a5edc5c3ecb8c9fa833177122ea2b435b8e..115ae4b098bbe857e9e24157042c85d985c04fbc 100644 (file)
@@ -523,9 +523,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)