summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-08-02 10:52:44 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-11-06 12:36:18 -0800
commitd21171c7783d0eb2391b7d599b2b4e2111c00ff9 (patch)
tree090f80091ddce5ccb49180f2d04d3489b0805774
parent1086ec0d573196d3b7d171e81c0366c5fce7a703 (diff)
xfs: teach scrub to flag non-extents format cow forksscrub-bmap-enhancements_2022-11-06
CoW forks only exist in memory, which means that they can only ever have an incore extent tree. Hence they must always be FMT_EXTENTS, so check this when we're scrubbing them. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
-rw-r--r--fs/xfs/scrub/bmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index 4bb6672b02ba..d50d0eab196a 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -748,6 +748,8 @@ xchk_bmap(
case XFS_DINODE_FMT_DEV:
case XFS_DINODE_FMT_LOCAL:
/* No mappings to check. */
+ if (whichfork == XFS_COW_FORK)
+ xchk_fblock_set_corrupt(sc, whichfork, 0);
goto out;
case XFS_DINODE_FMT_EXTENTS:
break;