diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-02 21:55:01 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2022-12-02 21:55:01 -0500 |
commit | 787768043dba6646712eef77c8076f3bfb0621cb (patch) | |
tree | 633118f4dfbca87caa29f0692c3251acf8d7e278 /libbcachefs/alloc_background.h | |
parent | 3867739e566d7f0df17ebed5e26c84ce88a90d40 (diff) |
Diffstat (limited to 'libbcachefs/alloc_background.h')
-rw-r--r-- | libbcachefs/alloc_background.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbcachefs/alloc_background.h b/libbcachefs/alloc_background.h index 7956d490..be48b7d8 100644 --- a/libbcachefs/alloc_background.h +++ b/libbcachefs/alloc_background.h @@ -150,6 +150,16 @@ void bch2_alloc_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); .atomic_trigger = bch2_mark_alloc, \ }) +int bch2_bucket_gens_invalid(const struct bch_fs *, struct bkey_s_c, int, struct printbuf *); +void bch2_bucket_gens_to_text(struct printbuf *, struct bch_fs *, struct bkey_s_c); + +#define bch2_bkey_ops_bucket_gens ((struct bkey_ops) { \ + .key_invalid = bch2_bucket_gens_invalid, \ + .val_to_text = bch2_bucket_gens_to_text, \ +}) + +int bch2_bucket_gens_init(struct bch_fs *); + static inline bool bkey_is_alloc(const struct bkey *k) { return k->type == KEY_TYPE_alloc || @@ -158,6 +168,7 @@ static inline bool bkey_is_alloc(const struct bkey *k) } int bch2_alloc_read(struct bch_fs *); +int bch2_bucket_gens_read(struct bch_fs *); int bch2_trans_mark_alloc(struct btree_trans *, enum btree_id, unsigned, struct bkey_s_c, struct bkey_i *, unsigned); |