xfs: scrub the secondary superblocks

Ensure that the geometry presented in the backup superblocks matches
the primary superblock so that repair can recover the filesystem if
that primary gets corrupted.

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:38 -07:00
parent b6c1beb967
commit 21fb4cb198
6 changed files with 340 additions and 1 deletions

View File

@@ -484,9 +484,10 @@ struct xfs_scrub_metadata {
/* Scrub subcommands. */
#define XFS_SCRUB_TYPE_PROBE 0 /* presence test ioctl */
#define XFS_SCRUB_TYPE_SB 1 /* superblock */
/* Number of scrub subcommands. */
#define XFS_SCRUB_TYPE_NR 1
#define XFS_SCRUB_TYPE_NR 2
/* i: Repair this metadata. */
#define XFS_SCRUB_IFLAG_REPAIR (1 << 0)