bcachefs: Kill allocator threads & freelists
authorKent Overstreet <kent.overstreet@gmail.com>
Mon, 10 Jan 2022 01:48:31 +0000 (20:48 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:29 +0000 (17:09 -0400)
commitf25d8215f499418c17dfde0b3158a66e03c758dc
tree2239ac974b58f41e6687a840c21cf2156795fded
parentc6b2826cd14c5421bc50a768e923d078a71139c1
bcachefs: Kill allocator threads & freelists

Now that we have new persistent data structures for the allocator, this
patch converts the allocator to use them.

Now, foreground bucket allocation uses the freespace btree to find
buckets to allocate, instead of popping buckets off the freelist.

The background allocator threads are no longer needed and are deleted,
as well as the allocator freelists. Now we only need background tasks
for invalidating buckets containing cached data (when we are low on
empty buckets), and for issuing discards.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
19 files changed:
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_foreground.c
fs/bcachefs/alloc_foreground.h
fs/bcachefs/alloc_types.h
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_update_interior.c
fs/bcachefs/buckets.c
fs/bcachefs/buckets.h
fs/bcachefs/buckets_types.h
fs/bcachefs/ec.c
fs/bcachefs/journal.c
fs/bcachefs/journal_io.c
fs/bcachefs/movinggc.c
fs/bcachefs/recovery.c
fs/bcachefs/super.c
fs/bcachefs/sysfs.c
fs/bcachefs/trace.h