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>
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)