xfs
[Top] [All Lists]

Re: [PATCH 09/47] xfs: introduce interval queries on btrees

To: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Subject: Re: [PATCH 09/47] xfs: introduce interval queries on btrees
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Mon, 1 Aug 2016 01:00:37 -0700
Cc: david@xxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, vishal.l.verma@xxxxxxxxx, bfoster@xxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <146907701913.25461.16492865819245768513.stgit@xxxxxxxxxxxxxxxx>
References: <146907695530.25461.3225785294902719773.stgit@xxxxxxxxxxxxxxxx> <146907701913.25461.16492865819245768513.stgit@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.6.1 (2016-04-27)
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@xxxxxxxxxx>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [PATCH 09/47] xfs: introduce interval queries on btrees, Christoph Hellwig <=