]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: introduce interval queries on btrees
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 10 Aug 2016 01:29:36 +0000 (11:29 +1000)
committerDave Chinner <david@fromorbit.com>
Wed, 10 Aug 2016 01:29:36 +0000 (11:29 +1000)
commit5d3b7fe1209d135326664acf24e511ba858b5cd6
tree1d58ae09b2a6174ebbbbda2ffa3e9738a5314eb6
parent13e831e03e5034416991d40dbf49353e6c72afcf
xfs: introduce interval queries on btrees

Source kernel commit: 105f7d83db4f82ce170893eaaca946754e38541f

Create a function to enable querying of btree records mapping to a
range of keys.  This will be used in subsequent patches to allow
querying the reverse mapping btree to find the extents mapped to a
range of physical blocks, though the generic code can be used for
any range query.

The overlapped query range function needs to use the btree get_block
helper because the root block could be an inode, in which case
bc_bufs[nlevels-1] will be NULL.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
include/xfs_trace.h
libxfs/xfs_btree.c
libxfs/xfs_btree.h