From: Darrick J. Wong Date: Fri, 17 Nov 2017 04:11:32 +0000 (-0600) Subject: xfs: scrub inode btrees X-Git-Tag: v4.15.0-rc1~143^2~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3898cda168b4d12f3fa003e6fdd74891d42b7997;p=thirdparty%2Fxfsprogs-dev.git xfs: scrub inode btrees 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 Reviewed-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index b214352ce..83adc1608 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -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); diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 5fc371fc5..728452c53 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -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)