]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: scrub inode btrees
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: 3daa664191375db6a4a0cced75183aa3ca96cbda

Check the records of the inode btrees to make sure that the values
make sense given the inode records themselves.

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 b214352ceaa14b27c736a5286516f7d961db6002..83adc1608823f1d9c0d510fcb01d0bee52f45def 100644 (file)
@@ -518,7 +518,7 @@ static inline int xfs_sb_version_hasftype(struct xfs_sb *sbp)
                 (sbp->sb_features2 & XFS_SB_VERSION2_FTYPE));
 }
 
-static inline int xfs_sb_version_hasfinobt(xfs_sb_t *sbp)
+static inline bool xfs_sb_version_hasfinobt(xfs_sb_t *sbp)
 {
        return (XFS_SB_VERSION_NUM(sbp) == XFS_SB_VERSION_5) &&
                (sbp->sb_features_ro_compat & XFS_SB_FEAT_RO_COMPAT_FINOBT);
index 5fc371fc5c15e629214e38185ad67ad04eb55b20..728452c5357c6a92e768c323452d1ac30ad5d628 100644 (file)
@@ -511,9 +511,11 @@ struct xfs_scrub_metadata {
 #define XFS_SCRUB_TYPE_AGI     4       /* AG inode header */
 #define XFS_SCRUB_TYPE_BNOBT   5       /* freesp by block btree */
 #define XFS_SCRUB_TYPE_CNTBT   6       /* freesp by length btree */
+#define XFS_SCRUB_TYPE_INOBT   7       /* inode btree */
+#define XFS_SCRUB_TYPE_FINOBT  8       /* free inode btree */
 
 /* Number of scrub subcommands. */
-#define XFS_SCRUB_TYPE_NR      7
+#define XFS_SCRUB_TYPE_NR      9
 
 /* i: Repair this metadata. */
 #define XFS_SCRUB_IFLAG_REPAIR         (1 << 0)