bcachefs: Copygc now uses backpointers
authorKent Overstreet <kent.overstreet@gmail.com>
Fri, 18 Mar 2022 04:42:09 +0000 (00:42 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:51 +0000 (17:09 -0400)
commit8e3f913e2ab6ac2cb9e75a0a8635d0b44f838c33
tree935cb6aa90e9ef93b1508be5f0c81f2f06ad8c3f
parenta8c752bb1d93a24a0de753e209d4f4d58d65c878
bcachefs: Copygc now uses backpointers

Previously, copygc needed to walk the entire extents & reflink btrees to
find extents that needed to be moved.

Now that we have backpointers, this patch implements
bch2_evacuate_bucket() in the move code, which copygc now uses for
evacuating mostly empty buckets.

Also, thanks to the new backpointers code, copygc can now move btree
nodes.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/buckets_types.h
fs/bcachefs/move.c
fs/bcachefs/move.h
fs/bcachefs/movinggc.c
fs/bcachefs/trace.h