]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: scrub the secondary superblocks
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: 21fb4cb1981ef7e02f35a42b2a5ae619517dfe1b

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

index cff4358d9f455f35eddf7e518f1d12a5690c62af..3fe66c23be789211df29f9c33557e25d331892b5 100644 (file)
@@ -505,9 +505,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)