summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2020-11-09 03:32:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-18 21:20:27 +0300
commit3bd97b33be4151b1e37e8a229ca58bcf511e9c31 (patch)
tree7e7e5e763a1230f1fc554050d6145bf40ae635f0 /fs/xfs
parent08e213bef2919a441bc1afbea69b06234ceea9fd (diff)
downloadlinux-3bd97b33be4151b1e37e8a229ca58bcf511e9c31.tar.xz
xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmapextents
[ Upstream commit 5dda3897fd90783358c4c6115ef86047d8c8f503 ] When the bmbt scrubber is looking up rmap extents, we need to set the extent flags from the bmbt record fully. This will matter once we fix the rmap btree comparison functions to check those flags correctly. Fixes: d852657ccfc0 ("xfs: cross-reference reverse-mapping btree") Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/xfs')
-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 392fb4df5c12..ec580c0d70fa 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -113,6 +113,8 @@ xchk_bmap_get_rmap(
if (info->whichfork == XFS_ATTR_FORK)
rflags |= XFS_RMAP_ATTR_FORK;
+ if (irec->br_state == XFS_EXT_UNWRITTEN)
+ rflags |= XFS_RMAP_UNWRITTEN;
/*
* CoW staging extents are owned (on disk) by the refcountbt, so