]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_healer: recommend offline fsck for XCORRUPT repairs
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Jun 2026 04:58:35 +0000 (21:58 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 3 Jun 2026 08:45:24 +0000 (10:45 +0200)
If the kernel thinks the repair succeeded but the re-scrub cannot
complete the cross-referencing checks, we should recommend an offline
repair instead of reporting the repair as completely successful or
unnecessary.  Codex noticed the omitted flag check here.

Cc: linux-xfs@vger.kernel.org # v7.0.0
Fixes: 6f0f35a87c8797 ("xfs_healer: enable repairing filesystems")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
healer/fsrepair.c

index 002e5e78fcf22ea9f8d90be97be7652afb33f578..3f9bd39de9cec6eaac895e6c346a77603ff7549b 100644 (file)
@@ -23,7 +23,7 @@ static enum repair_outcome from_repair_oflags(uint32_t oflags)
        if (oflags & (XFS_SCRUB_OFLAG_CORRUPT | XFS_SCRUB_OFLAG_INCOMPLETE))
                return REPAIR_FAILED;
 
-       if (oflags & XFS_SCRUB_OFLAG_XFAIL)
+       if (oflags & (XFS_SCRUB_OFLAG_XFAIL | XFS_SCRUB_OFLAG_XCORRUPT))
                return REPAIR_PROBABLY_OK;
 
        if (oflags & XFS_SCRUB_OFLAG_NO_REPAIR_NEEDED)