]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: add a new xfs_iext_lookup_extent_before helper
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
commitd6fbe8fe06c2b552b0f5f21765abb439d017d43a
treefa515287a9ac684597e385f926866e9e3882a2b8
parent6d79c95c0e2f7f0e71e520161f4e40603dd9be30
xfs: add a new xfs_iext_lookup_extent_before helper

Source kernel commit: dc56015faff1bc9e7493c2b28302c423a02237c2

This helper looks up the last extent the covers space before the passed
in block number.  This is useful for truncate and similar operations that
operate backwards over the extent list.  For xfs_bunmapi it also is
a slight optimization as we can return early if there are not extents
at or below the end of the to be truncated range.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c
libxfs/xfs_inode_fork.c
libxfs/xfs_inode_fork.h