]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: add a new xfs_iext_lookup_extent_before helper
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Oct 2017 23:32:39 +0000 (16:32 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:28 +0000 (15:38 -0700)
commit8f69daffa4681dc2885b806f8a4985e89fa0e037
treeb929e2deb6b55e0aa0df4bb1ccda6d1eb808a3aa
parent6a56c4403c359681bde0c76367be18d7e767c939
xfs: add a new xfs_iext_lookup_extent_before helper

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>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h
fs/xfs/xfs_reflink.c