btree_keys
struct bkey *__bch_bset_search(struct btree_keys *b, struct bset_tree *t,
static struct bkey *__bch_btree_iter_stack_init(struct btree_keys *b,
struct bkey *bch_btree_iter_stack_init(struct btree_keys *b,
struct btree_keys *b, ptr_filter_fn fn)
static void btree_mergesort(struct btree_keys *b, struct bset *out,
bool (*bad)(struct btree_keys *, const struct bkey *) = remove_stale
static void __btree_sort(struct btree_keys *b, struct btree_iter *iter,
void bch_btree_sort_partial(struct btree_keys *b, unsigned int start,
void bch_btree_sort_and_fix_extents(struct btree_keys *b,
void bch_btree_sort_into(struct btree_keys *b, struct btree_keys *new,
void bch_btree_sort_lazy(struct btree_keys *b, struct bset_sort_state *state)
void bch_btree_keys_stats(struct btree_keys *b, struct bset_stats *stats)
void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set)
static inline size_t btree_keys_bytes(struct btree_keys *b)
static inline size_t btree_keys_cachelines(struct btree_keys *b)
static inline size_t bset_tree_bytes(struct btree_keys *b)
static inline size_t bset_prev_bytes(struct btree_keys *b)
void bch_btree_keys_free(struct btree_keys *b)
int bch_btree_keys_alloc(struct btree_keys *b,
void bch_btree_keys_init(struct btree_keys *b, const struct btree_keys_ops *ops,
void bch_dump_bucket(struct btree_keys *b)
int __bch_count_data(struct btree_keys *b)
static void bset_alloc_tree(struct btree_keys *b, struct bset_tree *t)
static void bch_bset_build_unwritten_tree(struct btree_keys *b)
void __bch_check_keys(struct btree_keys *b, const char *fmt, ...)
void bch_bset_init_next(struct btree_keys *b, struct bset *i, uint64_t magic)
void bch_bset_build_written_tree(struct btree_keys *b)
void bch_bset_fix_invalidated_key(struct btree_keys *b, struct bkey *k)
static void bch_bset_fix_lookup_table(struct btree_keys *b,
bool bch_bkey_try_merge(struct btree_keys *b, struct bkey *l, struct bkey *r)
void bch_bset_insert(struct btree_keys *b, struct bkey *where,
unsigned int bch_btree_insert_key(struct btree_keys *b, struct bkey *k,
struct btree_keys;
bool (*insert_fixup)(struct btree_keys *b,
bool (*key_invalid)(struct btree_keys *bk,
bool (*key_bad)(struct btree_keys *bk,
bool (*key_merge)(struct btree_keys *bk,
void (*key_dump)(struct btree_keys *keys,
static inline struct bset_tree *bset_tree_last(struct btree_keys *b)
static inline bool bset_written(struct btree_keys *b, struct bset_tree *t)
static inline bool bkey_written(struct btree_keys *b, struct bkey *k)
static inline unsigned int bset_byte_offset(struct btree_keys *b,
static inline unsigned int bset_sector_offset(struct btree_keys *b,
static inline size_t bch_btree_keys_u64s_remaining(struct btree_keys *b)
static inline struct bset *bset_next_set(struct btree_keys *b,
void bch_btree_keys_free(struct btree_keys *b);
int bch_btree_keys_alloc(struct btree_keys *b, unsigned int page_order,
void bch_btree_keys_init(struct btree_keys *b, const struct btree_keys_ops *ops,
void bch_bset_init_next(struct btree_keys *b, struct bset *i, uint64_t magic);
void bch_bset_build_written_tree(struct btree_keys *b);
void bch_bset_fix_invalidated_key(struct btree_keys *b, struct bkey *k);
bool bch_bkey_try_merge(struct btree_keys *b, struct bkey *l, struct bkey *r);
void bch_bset_insert(struct btree_keys *b, struct bkey *where,
unsigned int bch_btree_insert_key(struct btree_keys *b, struct bkey *k,
struct btree_keys *b;
typedef bool (*ptr_filter_fn)(struct btree_keys *b, const struct bkey *k);
struct btree_keys *b,
struct bkey *bch_btree_iter_stack_init(struct btree_keys *b,
struct bkey *__bch_bset_search(struct btree_keys *b, struct bset_tree *t,
static inline struct bkey *bch_bset_search(struct btree_keys *b,
void bch_btree_sort_lazy(struct btree_keys *b, struct bset_sort_state *state);
void bch_btree_sort_into(struct btree_keys *b, struct btree_keys *new,
void bch_btree_sort_and_fix_extents(struct btree_keys *b,
void bch_btree_sort_partial(struct btree_keys *b, unsigned int start,
static inline void bch_btree_sort(struct btree_keys *b,
void bch_btree_keys_stats(struct btree_keys *b, struct bset_stats *state);
static inline bool bch_ptr_invalid(struct btree_keys *b, const struct bkey *k)
static inline bool bch_ptr_bad(struct btree_keys *b, const struct bkey *k)
static inline void bch_bkey_to_text(struct btree_keys *b, char *buf,
int __bch_count_data(struct btree_keys *b);
void __printf(2, 3) __bch_check_keys(struct btree_keys *b,
void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
void bch_dump_bucket(struct btree_keys *b);
static inline int __bch_count_data(struct btree_keys *b) { return -1; }
__bch_check_keys(struct btree_keys *b, const char *fmt, ...) {}
static inline void bch_dump_bucket(struct btree_keys *b) {}
void bch_dump_bset(struct btree_keys *b, struct bset *i, unsigned int set);
static inline bool btree_keys_expensive_checks(struct btree_keys *b)
static inline int bch_count_data(struct btree_keys *b)
struct btree_keys keys;
static void bch_bkey_dump(struct btree_keys *keys, const struct bkey *k)
static bool bch_btree_ptr_invalid(struct btree_keys *bk, const struct bkey *k)
static bool bch_btree_ptr_bad(struct btree_keys *bk, const struct bkey *k)
static bool bch_btree_ptr_insert_fixup(struct btree_keys *bk,
static bool bch_extent_insert_fixup(struct btree_keys *b,
static bool bch_extent_invalid(struct btree_keys *bk, const struct bkey *k)
static bool bch_extent_bad(struct btree_keys *bk, const struct bkey *k)
static bool bch_extent_merge(struct btree_keys *bk,