bcachefs: Split out struct gc_stripe from struct stripe
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 5 Dec 2021 04:07:33 +0000 (23:07 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:18 +0000 (17:09 -0400)
commit990d42d1873c16b6080c887f6bb27e56c0f885cf
treea638e00b4d0337d74f26304fbc23d9a294f4fff7
parentf54788cc8c79cad2ac8016d1c4a8a1373a4d7707
bcachefs: Split out struct gc_stripe from struct stripe

We have two radix trees of stripes - one that mirrors some information
from the stripes btree in normal operation, and another that GC uses to
recalculate block usage counts.

The normal one is now only used for finding partially empty stripes in
order to reuse them - the normal stripes radix tree and the GC stripes
radix tree are used significantly differently, so this patch splits them
into separate types.

In an upcoming patch we'll be replacing c->stripes with a btree that
indexes stripes by the order we want to reuse them.

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