Skip to content

Commit 69010fe

Browse files
author
Darrick J. Wong
committed
xfs: standardize ondisk to incore conversion for bmap btrees
Fix all xfs_bmbt_disk_get_all callsites to call xfs_bmap_validate_extent and bubble up corruption reports. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
1 parent c4e3417 commit 69010fe

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

fs/xfs/scrub/bmap.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,12 @@ xchk_bmapbt_rec(
471471
return 0;
472472

473473
xfs_bmbt_disk_get_all(&rec->bmbt, &irec);
474+
if (xfs_bmap_validate_extent(ip, info->whichfork, &irec) != NULL) {
475+
xchk_fblock_set_corrupt(bs->sc, info->whichfork,
476+
irec.br_startoff);
477+
return 0;
478+
}
479+
474480
if (!xfs_iext_lookup_extent(ip, ifp, irec.br_startoff, &icur,
475481
&iext_irec) ||
476482
irec.br_startoff != iext_irec.br_startoff ||

0 commit comments

Comments
 (0)