bcachefs: Allocator prefers not to expand mi.btree_allocated bitmap
authorKent Overstreet <kent.overstreet@linux.dev>
Sat, 20 Apr 2024 20:25:34 +0000 (16:25 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 8 May 2024 21:29:24 +0000 (17:29 -0400)
commitc6705091342c06c963015dac07ede417d2e0ad04
tree2aef8c3ba1f7d351b89eb49b3a4c18a3657da80d
parent40574946b8a5179ed811bc9783d21bed302eb949
bcachefs: Allocator prefers not to expand mi.btree_allocated bitmap

We now have a small bitmap in the member info section of the superblock
for "regions that have btree nodes", so that if we ever have to scan for
btree nodes in repair we don't have to scan the whole device(s).

This tweaks the allocator to prefer allocating from regions that are
already marked in this bitmap.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_types.h
fs/bcachefs/bcachefs.h