bcachefs: Add btree node prefetching to bch2_btree_and_journal_walk()
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 11 Jan 2021 21:11:02 +0000 (16:11 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:51 +0000 (17:08 -0400)
commitedfbba58e3e7a94900d24d266e6365b1ab531e3b
treee523610cc02bc6a6b17c13155f920155d3e40a3b
parent2a3731e34de9365038b25d76bb6e11cf5c40ac36
bcachefs: Add btree node prefetching to bch2_btree_and_journal_walk()

bch2_btree_and_journal_walk() walks the btree overlaying keys from the
journal; it was introduced so that we could read in the alloc btree
prior to journal replay being done, when journalling of updates to
interior btree nodes was introduced.

But it didn't have btree node prefetching, which introduced a severe
regression with mount times, particularly on spinning rust. This patch
implements btree node prefetching for the btree + journal walk,
hopefully fixing that.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/btree_cache.c
fs/bcachefs/btree_cache.h
fs/bcachefs/btree_iter.c
fs/bcachefs/recovery.c