Lines Matching defs:btree_keys
150 struct btree_keys;
194 bool (*insert_fixup)(struct btree_keys *b,
198 bool (*key_invalid)(struct btree_keys *bk,
200 bool (*key_bad)(struct btree_keys *bk,
202 bool (*key_merge)(struct btree_keys *bk,
207 void (*key_dump)(struct btree_keys *keys,
217 struct btree_keys {
234 static inline struct bset_tree *bset_tree_last(struct btree_keys *b)
239 static inline bool bset_written(struct btree_keys *b, struct bset_tree *t)
244 static inline bool bkey_written(struct btree_keys *b, struct bkey *k)
249 static inline unsigned int bset_byte_offset(struct btree_keys *b,
255 static inline unsigned int bset_sector_offset(struct btree_keys *b,
269 static inline size_t bch_btree_keys_u64s_remaining(struct btree_keys *b)
284 static inline struct bset *bset_next_set(struct btree_keys *b,
292 void bch_btree_keys_free(struct btree_keys *b);
293 int bch_btree_keys_alloc(struct btree_keys *b, unsigned int page_order,
295 void bch_btree_keys_init(struct btree_keys *b, const struct btree_keys_ops *ops,
298 void bch_bset_init_next(struct btree_keys *b, struct bset *i, uint64_t magic);
299 void bch_bset_build_written_tree(struct btree_keys *b);
300 void bch_bset_fix_invalidated_key(struct btree_keys *b, struct bkey *k);
301 bool bch_bkey_try_merge(struct btree_keys *b, struct bkey *l, struct bkey *r);
302 void bch_bset_insert(struct btree_keys *b, struct bkey *where,
304 unsigned int bch_btree_insert_key(struct btree_keys *b, struct bkey *k,
320 struct btree_keys *b;
327 typedef bool (*ptr_filter_fn)(struct btree_keys *b, const struct bkey *k);
331 struct btree_keys *b,
336 struct bkey *bch_btree_iter_init(struct btree_keys *b,
340 struct bkey *__bch_bset_search(struct btree_keys *b, struct bset_tree *t,
346 static inline struct bkey *bch_bset_search(struct btree_keys *b,
375 void bch_btree_sort_lazy(struct btree_keys *b, struct bset_sort_state *state);
376 void bch_btree_sort_into(struct btree_keys *b, struct btree_keys *new,
378 void bch_btree_sort_and_fix_extents(struct btree_keys *b,
381 void bch_btree_sort_partial(struct btree_keys *b, unsigned int start,
384 static inline void bch_btree_sort(struct btree_keys *b,
396 void bch_btree_keys_stats(struct btree_keys *b, struct bset_stats *state);
459 static inline bool bch_ptr_invalid(struct btree_keys *b, const struct bkey *k)
464 static inline bool bch_ptr_bad(struct btree_keys *b, const struct bkey *k)
469 static inline void bch_bkey_to_text(struct btree_keys *b, char *buf,
556 int __bch_count_data(struct btree_keys *b);
557 void __printf(2, 3) __bch_check_keys(struct btree_keys *b,
560 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
561 void bch_dump_bucket(struct btree_keys *b);
565 static inline int __bch_count_data(struct btree_keys *b) { return -1; }
567 __bch_check_keys(struct btree_keys *b, const char *fmt, ...) {}
568 static inline void bch_dump_bucket(struct btree_keys *b) {}
569 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
573 static inline bool btree_keys_expensive_checks(struct btree_keys *b)
582 static inline int bch_count_data(struct btree_keys *b)