bcachefs: Convert gc to new accounting
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 12 Feb 2024 03:48:05 +0000 (22:48 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 14 Jul 2024 23:00:13 +0000 (19:00 -0400)
commitfb23d57a6dfc4e521c003dc542799f07d22d269e
tree0a814ccf2c3c06614f1b2ed0a48950f3a57783e4
parent4c4a7d48bd59380fa4fc75f2cd341e9de09adbf7
bcachefs: Convert gc to new accounting

Rewrite fsck/gc for the new accounting scheme.

This adds a second set of in-memory accounting counters for gc to use;
like with other parts of gc we run all trigger in TRIGGER_GC mode, then
compare what we calculated to existing in-memory accounting at the end.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
17 files changed:
fs/bcachefs/alloc_background.c
fs/bcachefs/alloc_foreground.c
fs/bcachefs/bcachefs.h
fs/bcachefs/btree_gc.c
fs/bcachefs/btree_trans_commit.c
fs/bcachefs/buckets.c
fs/bcachefs/buckets.h
fs/bcachefs/buckets_types.h
fs/bcachefs/disk_accounting.c
fs/bcachefs/disk_accounting.h
fs/bcachefs/ec.c
fs/bcachefs/inode.c
fs/bcachefs/recovery.c
fs/bcachefs/replicas.c
fs/bcachefs/replicas.h
fs/bcachefs/super.c
fs/bcachefs/util.h