bcachefs: Evict btree nodes we're deleting
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 25 Apr 2021 20:24:03 +0000 (16:24 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:02 +0000 (17:09 -0400)
commitceda1b9a179ffd8ece3f7d15d5b1379eb2552215
tree4592179ca6ebdb0c98516965d0183c0bfa02600b
parentfc51b041b72a7cbffc60811ff14d25207a4f7624
bcachefs: Evict btree nodes we're deleting

There was a bug that led to duplicate btree node pointers being inserted
at the wrong level. The new topology repair code can fix that, except
that the btree cache code gets confused when we read in a btree node
from the pointer that was at the wrong level. This patch evicts nodes
that we're deleting to, which nicely solves the problem.

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_gc.c