xfs: refactor file range validation
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 4 Dec 2020 21:28:35 +0000 (13:28 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 Dec 2020 17:49:38 +0000 (09:49 -0800)
commit33005fd0a537501111fc97ec330b721388c6b451
tree1838c7876c83cac6d755b34b920ea1ca006ddcb3
parent18695ad4251462b33787b7e375dbda57c1969c8f
xfs: refactor file range validation

Refactor all the open-coded validation of file block ranges into a
single helper, and teach the bmap scrubber to check the ranges.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_types.c
fs/xfs/libxfs/xfs_types.h
fs/xfs/scrub/bmap.c
fs/xfs/xfs_bmap_item.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_rmap_item.c
fs/xfs/xfs_super.c