bcachefs: Freespace, need_discard btrees
authorKent Overstreet <kent.overstreet@gmail.com>
Sat, 11 Dec 2021 22:13:09 +0000 (17:13 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:29 +0000 (17:09 -0400)
commitc6b2826cd14c5421bc50a768e923d078a71139c1
tree7a914ef8a811c4330a42ee397c852ff1c7d6a04d
parent3d48a7f85f83a51a0eb0d0a6537be26a20691260
bcachefs: Freespace, need_discard btrees

This adds two new btrees for the upcoming allocator rewrite: an extents
btree of free buckets, and a btree for buckets awaiting discards.

We also add a new trigger for alloc keys to keep the new btrees up to
date, and a compatibility path to initialize them on existing
filesystems.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
16 files changed:
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_background.h
fs/bcachefs/alloc_foreground.h
fs/bcachefs/bcachefs.h
fs/bcachefs/bcachefs_format.h
fs/bcachefs/bkey_methods.c
fs/bcachefs/btree_io.c
fs/bcachefs/btree_types.h
fs/bcachefs/buckets.c
fs/bcachefs/buckets.h
fs/bcachefs/extent_update.c
fs/bcachefs/recovery.c
fs/bcachefs/super-io.c
fs/bcachefs/super-io.h
fs/bcachefs/super.c
fs/bcachefs/super_types.h