]> git.sesse.net Git - bcachefs-tools-debian/blob - libbcachefs/btree_key_cache.h
Update bcachefs sources to 4837f82ee1 bcachefs: Use cached iterators for alloc btree
[bcachefs-tools-debian] / libbcachefs / btree_key_cache.h
1 #ifndef _BCACHEFS_BTREE_KEY_CACHE_H
2 #define _BCACHEFS_BTREE_KEY_CACHE_H
3
4 int bch2_btree_iter_traverse_cached(struct btree_iter *);
5
6 bool bch2_btree_insert_key_cached(struct btree_trans *,
7                         struct btree_iter *, struct bkey_i *);
8 int bch2_btree_key_cache_flush(struct btree_trans *,
9                                enum btree_id, struct bpos);
10 #ifdef CONFIG_BCACHEFS_DEBUG
11 void bch2_btree_key_cache_verify_clean(struct btree_trans *,
12                                 enum btree_id, struct bpos);
13 #else
14 static inline void
15 bch2_btree_key_cache_verify_clean(struct btree_trans *trans,
16                                 enum btree_id id, struct bpos pos) {}
17 #endif
18
19 void bch2_fs_btree_key_cache_exit(struct btree_key_cache *);
20 void bch2_fs_btree_key_cache_init_early(struct btree_key_cache *);
21 int bch2_fs_btree_key_cache_init(struct btree_key_cache *);
22
23 #endif /* _BCACHEFS_BTREE_KEY_CACHE_H */