diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-12-05 07:07:33 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:18 +0300 |
commit | 990d42d1873c16b6080c887f6bb27e56c0f885cf (patch) | |
tree | a638e00b4d0337d74f26304fbc23d9a294f4fff7 /fs/bcachefs/ec.h | |
parent | f54788cc8c79cad2ac8016d1c4a8a1373a4d7707 (diff) | |
download | linux-990d42d1873c16b6080c887f6bb27e56c0f885cf.tar.xz |
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>
Diffstat (limited to 'fs/bcachefs/ec.h')
-rw-r--r-- | fs/bcachefs/ec.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/bcachefs/ec.h b/fs/bcachefs/ec.h index eb16e140e2c8..468141072bb4 100644 --- a/fs/bcachefs/ec.h +++ b/fs/bcachefs/ec.h @@ -108,7 +108,7 @@ static inline bool bch2_ptr_matches_stripe(const struct bch_stripe *s, le16_to_cpu(s->sectors)); } -static inline bool bch2_ptr_matches_stripe_m(const struct stripe *m, +static inline bool bch2_ptr_matches_stripe_m(const struct gc_stripe *m, struct extent_ptr_decoded p) { unsigned nr_data = m->nr_blocks - m->nr_redundant; @@ -216,7 +216,6 @@ void bch2_ec_flush_new_stripes(struct bch_fs *); void bch2_stripes_heap_start(struct bch_fs *); int bch2_stripes_read(struct bch_fs *); -int bch2_stripes_write(struct bch_fs *, unsigned); int bch2_ec_mem_alloc(struct bch_fs *, bool); |