[PATCH 09/47] xfs: introduce interval queries on btrees
Christoph Hellwig
hch at infradead.org
Mon Aug 1 03:00:37 CDT 2016
On Wed, Jul 20, 2016 at 09:56:59PM -0700, Darrick J. Wong wrote:
> 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.
>
> v2: add some shortcuts so that we can jump out of processing once
> we know there won't be any more records to find.
>
> v3: document the range query algorithm, refactor the pop-up code,
> fix the diff_two_keys usage.
>
> v4: The overlapped query range function should use the btree get_block
> helper because the root block could be an inode, in which case
> bc_bufs[nlevels-1] will be NULL. Refactor the key calculations
> so that we can return -EINVAL if low > high.
>
> Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>
Looks fine,
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list