[U-Boot] fs: btrfs: fix false negatives in ROOT_ITEM search

Pierre Bourdon delroth at gmail.com
Sat Apr 27 14:50:18 UTC 2019


Hi Tom,

On Sat, Apr 27, 2019 at 4:46 PM Tom Rini <trini at konsulko.com> 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 <delroth at gmail.com>
> > Cc: Marek Behun <marek.behun at nic.cz>
>
> 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,
Best,


--
Pierre Bourdon <delroth at gmail.com>
Software Engineer @ Zürich, Switzerland
https://delroth.net/


More information about the U-Boot mailing list