]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: add missing repair types to the mustfix and difficulty assessment
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:04 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:07 +0000 (17:01 -0700)
Add a few scrub types that ought to trigger a mustfix (such as AGI
corruption) and all the AG space metadata to the repair difficulty
assessment.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/repair.c

index 8ee9102ab58d3b249ebf31a952239ee7400aedea..33a8031103c63c7c09dd76b1f665cc34b540aca8 100644 (file)
@@ -299,6 +299,7 @@ action_list_find_mustfix(
                if (!(aitem->flags & XFS_SCRUB_OFLAG_CORRUPT))
                        continue;
                switch (aitem->type) {
+               case XFS_SCRUB_TYPE_AGI:
                case XFS_SCRUB_TYPE_FINOBT:
                case XFS_SCRUB_TYPE_INOBT:
                        alist->nr--;
@@ -325,11 +326,17 @@ action_list_difficulty(
                case XFS_SCRUB_TYPE_RMAPBT:
                        ret |= REPAIR_DIFFICULTY_SECONDARY;
                        break;
+               case XFS_SCRUB_TYPE_SB:
+               case XFS_SCRUB_TYPE_AGF:
+               case XFS_SCRUB_TYPE_AGFL:
+               case XFS_SCRUB_TYPE_AGI:
                case XFS_SCRUB_TYPE_FINOBT:
                case XFS_SCRUB_TYPE_INOBT:
                case XFS_SCRUB_TYPE_BNOBT:
                case XFS_SCRUB_TYPE_CNTBT:
                case XFS_SCRUB_TYPE_REFCNTBT:
+               case XFS_SCRUB_TYPE_RTBITMAP:
+               case XFS_SCRUB_TYPE_RTSUM:
                        ret |= REPAIR_DIFFICULTY_PRIMARY;
                        break;
                }