On Mon, Nov 26, 2018 at 04:53:11PM +0000, Filipe Manana wrote: > On Fri, Nov 16, 2018 at 11:09 AM <fdman...@kernel.org> wrote: > > > > From: Filipe Manana <fdman...@suse.com> > > > > Commit d7396f07358a ("Btrfs: optimize key searches in btrfs_search_slot"), > > dated from August 2013, introduced an optimization to search for keys in a > > node/leaf to both btrfs_search_slot() and btrfs_search_old_slot(). For the > > later, it ended up being reverted in commit d4b4087c43cc ("Btrfs: do a > > full search everytime in btrfs_search_old_slot"), from September 2013, > > because the content of extent buffers were often inconsistent during > > replay. It turned out that the reason why they were often inconsistent was > > because the extent buffer replay stopped being done atomically, and got > > broken after commit c8cc63416537 ("Btrfs: stop using GFP_ATOMIC for the > > tree mod log allocations"), introduced in July 2013. The extent buffer > > replay issue was then found and fixed by commit 5de865eebb83 ("Btrfs: fix > > tree mod logging"), dated from December 2013. > > > > So bring back the optimization to btrfs_search_old_slot() as skipping it > > and its comment about disabling it confusing. After all, if unwinding > > extent buffers resulted in some inconsistency, the normal searches (binary > > searches) would also not always work. > > > > Signed-off-by: Filipe Manana <fdman...@suse.com> > > David, please remove this change from the integration branch. > > It turns out after 3 weeks of stress tests it finally triggered an > assertion failure (hard to hit) and > it's indeed not reliable to use the search optimization because of how > the mod log tree currently works. > The idea was just to not make it different from btrfs_search_slot(). > Use of the mod log tree is limited > to some cases where occasional faster search wouldn't bring much benefits.
Understood, thanks. Patch removed from misc-next.