From: Tom Rini Date: Sat, 27 Apr 2019 10:53:49 -0400 Subject: [U-Boot] fs: btrfs: fix false negatives in ROOT_ITEM search In-Reply-To: References: <20190413215049.15305-1-delroth@gmail.com> <20190427144619.GM31207@bill-the-cat> Message-ID: <20190427145349.GE31207@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Apr 27, 2019 at 04:50:18PM +0200, Pierre Bourdon wrote: > Hi Tom, > > On Sat, Apr 27, 2019 at 4:46 PM Tom Rini wrote: > > On Sat, Apr 13, 2019 at 11:50:49PM +0200, Pierre Bourdon wrote: > > > ROOT_ITEMs in btrfs are referenced without knowing their actual "offset" > > > value. To perform these searches using only two items from the key, the > > > btrfs driver uses a special "btrfs_search_tree_key_type" function. > > > > > > The algorithm used by that function to transform a 3-tuple search into a > > > 2-tuple search was subtly broken, leading to items not being found if > > > they were the first in their tree node. > > > > > > This commit fixes btrfs_search_tree_key_type to properly behave in these > > > situations. > > > > > > Signed-off-by: Pierre Bourdon > > > Cc: Marek Behun > > > > Applied to u-boot/master, thanks! > > Please disregard this patch as was mentioned in a followup email on the thread. > > https://patchwork.ozlabs.org/patch/1085991/ implements a better way of > addressing the problem and fixes a 2nd btrfs bug that was missed in > this first revision. > > Sorry for the mixup, OK, I'll take care of things, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: