From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.9]:59125 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbcHAIBh (ORCPT ); Mon, 1 Aug 2016 04:01:37 -0400 Date: Mon, 1 Aug 2016 01:00:37 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Cc: david@fromorbit.com, linux-fsdevel@vger.kernel.org, vishal.l.verma@intel.com, bfoster@redhat.com, xfs@oss.sgi.com Subject: Re: [PATCH 09/47] xfs: introduce interval queries on btrees Message-ID: <20160801080037.GA30547@infradead.org> References: <146907695530.25461.3225785294902719773.stgit@birch.djwong.org> <146907701913.25461.16492865819245768513.stgit@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <146907701913.25461.16492865819245768513.stgit@birch.djwong.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 Looks fine, Reviewed-by: Christoph Hellwig