summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/scrub.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-29 11:04:25 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:29 -0700
commit472d7f6597bfe385e8e5a7ff0611a82a7349d2f1 (patch)
tree00469051116b0802d244a5fb28b64e72a8a96cf8 /fs/xfs/scrub/scrub.h
parent101509dc86832b90da5dff83e93c0526b3a69c65 (diff)
xfs: ensure that all metadata and data blocks are not cow staging extentsscrub-detect-refcount-gaps_2022-10-14
Make sure that all filesystem metadata blocks and file data blocks are not also marked as CoW staging extents. The extra checking added here was inspired by an actual VM host filesystem corruption incident due to bugs in the CoW handling of 4.x kernels. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/scrub.h')
-rw-r--r--fs/xfs/scrub/scrub.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h
index 85c055c2ddc5..a331838e22ff 100644
--- a/fs/xfs/scrub/scrub.h
+++ b/fs/xfs/scrub/scrub.h
@@ -166,6 +166,8 @@ void xchk_xref_is_cow_staging(struct xfs_scrub *sc, xfs_agblock_t bno,
xfs_extlen_t len);
void xchk_xref_is_not_shared(struct xfs_scrub *sc, xfs_agblock_t bno,
xfs_extlen_t len);
+void xchk_xref_is_not_cow_staging(struct xfs_scrub *sc, xfs_agblock_t bno,
+ xfs_extlen_t len);
#ifdef CONFIG_XFS_RT
void xchk_xref_is_used_rt_space(struct xfs_scrub *sc, xfs_rtblock_t rtbno,
xfs_extlen_t len);