Skip to content

Commit

Permalink
xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmap…
Browse files Browse the repository at this point in the history
…extents

[ Upstream commit 5dda389 ]

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: d852657 ("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>
  • Loading branch information
djwong authored and gregkh committed Nov 18, 2020
1 parent ac560d2 commit a58e217
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/xfs/scrub/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a58e217

Please sign in to comment.