diff options
author | 2022-11-06 17:03:22 -0800 | |
---|---|---|
committer | 2022-11-16 15:25:05 -0800 | |
commit | 5eef46358fae1a6018d9f886a3ecd30e843728dd (patch) | |
tree | 1750a020bb4d301baae409bc8214db725091e013 /fs/xfs/scrub | |
parent | xfs: check that CoW fork extents are not shared (diff) | |
download | linux-5eef46358fae1a6018d9f886a3ecd30e843728dd.tar.gz linux-5eef46358fae1a6018d9f886a3ecd30e843728dd.tar.bz2 linux-5eef46358fae1a6018d9f886a3ecd30e843728dd.zip |
xfs: teach scrub to flag non-extents format cow forks
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>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 2 |
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; |