Lines Matching refs: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 { struct
234 static inline struct bset_tree *bset_tree_last(struct btree_keys *b) in bset_tree_last() argument
239 static inline bool bset_written(struct btree_keys *b, struct bset_tree *t) in bset_written()
244 static inline bool bkey_written(struct btree_keys *b, struct bkey *k) in bkey_written()
249 static inline unsigned int bset_byte_offset(struct btree_keys *b, in bset_byte_offset()
255 static inline unsigned int bset_sector_offset(struct btree_keys *b, in bset_sector_offset()
269 static inline size_t bch_btree_keys_u64s_remaining(struct btree_keys *b) in bch_btree_keys_u64s_remaining()
284 static inline struct bset *bset_next_set(struct btree_keys *b, in bset_next_set()
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;
334 typedef bool (*ptr_filter_fn)(struct btree_keys *b, const struct bkey *k);
338 struct btree_keys *b,
343 struct bkey *bch_btree_iter_stack_init(struct btree_keys *b,
347 struct bkey *__bch_bset_search(struct btree_keys *b, struct bset_tree *t,
353 static inline struct bkey *bch_bset_search(struct btree_keys *b, in bch_bset_search()
383 void bch_btree_sort_lazy(struct btree_keys *b, struct bset_sort_state *state);
384 void bch_btree_sort_into(struct btree_keys *b, struct btree_keys *new,
386 void bch_btree_sort_and_fix_extents(struct btree_keys *b,
389 void bch_btree_sort_partial(struct btree_keys *b, unsigned int start,
392 static inline void bch_btree_sort(struct btree_keys *b, in bch_btree_sort()
404 void bch_btree_keys_stats(struct btree_keys *b, struct bset_stats *state);
467 static inline bool bch_ptr_invalid(struct btree_keys *b, const struct bkey *k) in bch_ptr_invalid()
472 static inline bool bch_ptr_bad(struct btree_keys *b, const struct bkey *k) in bch_ptr_bad()
477 static inline void bch_bkey_to_text(struct btree_keys *b, char *buf, in bch_bkey_to_text()
564 int __bch_count_data(struct btree_keys *b);
565 void __printf(2, 3) __bch_check_keys(struct btree_keys *b,
568 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
569 void bch_dump_bucket(struct btree_keys *b);
573 static inline int __bch_count_data(struct btree_keys *b) { return -1; } in __bch_count_data()
575 __bch_check_keys(struct btree_keys *b, const char *fmt, ...) {} in __bch_check_keys()
576 static inline void bch_dump_bucket(struct btree_keys *b) {} in bch_dump_bucket()
577 void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
581 static inline bool btree_keys_expensive_checks(struct btree_keys *b) in btree_keys_expensive_checks()
590 static inline int bch_count_data(struct btree_keys *b) in bch_count_data()