bcachefs: Check btree topology at startup
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 29 Mar 2020 20:48:53 +0000 (16:48 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:08:37 +0000 (17:08 -0400)
commitd06c1a0cbce929c0bafd7f37dcb0fbf9e652abb5
treefad797b5a397fde26f06ea7e6217eaebff565e6e
parenta0e491c099a25d06759bf8e6e9bcc6fd7c4229a5
bcachefs: Check btree topology at startup

When initial btree gc was changed to overlay journal keys as it walks
the btree, it also stopped checking btree topology.

Previously, checking btree topology was a fairly complicated affair -
but it's much easier now that btree_ptr_v2 has min_key in the pointer.

This rewrites the old range_checks code and uses it in both runtime and
initial gc.

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