bcachefs: btree_gc no longer uses main in-memory bucket array
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 26 Dec 2021 01:39:19 +0000 (20:39 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:23 +0000 (17:09 -0400)
commitec061b215d63b5e85ebf1a4ecfae661c01578c2e
tree959a9d0b7eb87d6fc03636ba8610b5f73b12cf28
parent63a2edce9487b1fcea7257676614456846f9ab09
bcachefs: btree_gc no longer uses main in-memory bucket array

This changes the btree_gc code to only use the second bucket array, the
one dedicated to GC. On completion, it compares what's in its in memory
bucket array to the allocation information in the btree and writes it
directly, instead of updating the main in-memory bucket array and
writing that.

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