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;
338 typedef bool (*ptr_filter_fn)(struct btree_keys *b, const struct bkey *k);
342 struct btree_keys *b,
347 struct bkey *bch_btree_iter_stack_init(struct btree_keys *b,
351 struct bkey *__bch_bset_search(struct btree_keys *b, struct bset_tree *t,
357 static inline struct bkey *bch_bset_search(struct btree_keys *b,
387 void bch_btree_sort_lazy(struct btree_keys *b, struct bset_sort_state *state);
388 void bch_btree_sort_into(struct btree_keys *b, struct btree_keys *new,
390 void bch_btree_sort_and_fix_extents(struct btree_keys *b,
393 void bch_btree_sort_partial(struct btree_keys *b, unsigned int start,
396 static inline void bch_btree_sort(struct btree_keys *b,
408 void bch_btree_keys_stats(struct btree_keys *b, struct bset_stats *state);
471 static inline bool bch_ptr_invalid(struct btree_keys *b, const struct bkey *k)
476 static inline bool bch_ptr_bad(struct btree_keys *b, const struct bkey *k)
481 static inline void bch_bkey_to_text(struct btree_keys *b, char *buf,
568 int __bch_count_data(struct btree_keys *b);
569 void __printf(2, 3) __bch_check_keys(struct btree_keys *b,
572 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
573 void bch_dump_bucket(struct btree_keys *b);
577 static inline int __bch_count_data(struct btree_keys *b) { return -1; }
579 __bch_check_keys(struct btree_keys *b, const char *fmt, ...) {}
580 static inline void bch_dump_bucket(struct btree_keys *b) {}
581 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
585 static inline bool btree_keys_expensive_checks(struct btree_keys *b)
594 static inline int bch_count_data(struct btree_keys *b)