xfs: scrub the AGI

Add a forgotten check to the AGI verifier, then wire up the scrub
infrastructure to check the AGI contents.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
Darrick J. Wong
2017-10-17 21:37:39 -07:00
parent ab9d5dc59f
commit a12890aebb
5 changed files with 95 additions and 3 deletions

View File

@@ -487,9 +487,10 @@ struct xfs_scrub_metadata {
#define XFS_SCRUB_TYPE_SB 1 /* superblock */
#define XFS_SCRUB_TYPE_AGF 2 /* AG free header */
#define XFS_SCRUB_TYPE_AGFL 3 /* AG free list */
#define XFS_SCRUB_TYPE_AGI 4 /* AG inode header */
/* Number of scrub subcommands. */
#define XFS_SCRUB_TYPE_NR 4
#define XFS_SCRUB_TYPE_NR 5
/* i: Repair this metadata. */
#define XFS_SCRUB_IFLAG_REPAIR (1 << 0)