Lines Matching refs:btree

122 #define btree(fn, key, b, op, ...)					\  macro
126 struct btree *_child = bch_btree_node_get((b)->c, op, key, l, \
146 struct btree *_b = (c)->root; \
163 static inline struct bset *write_block(struct btree *b) in write_block()
168 static void bch_btree_init_next(struct btree *b) in bch_btree_init_next()
195 static uint64_t btree_csum_set(struct btree *b, struct bset *i) in btree_csum_set()
204 void bch_btree_node_read_done(struct btree *b) in bch_btree_node_read_done()
299 static void bch_btree_node_read(struct btree *b) in bch_btree_node_read()
337 static void btree_complete_write(struct btree *b, struct btree_write *w) in btree_complete_write()
354 struct btree *b = container_of(cl, struct btree, io); in btree_node_write_unlock()
361 struct btree *b = container_of(cl, struct btree, io); in __btree_node_write_done()
376 struct btree *b = container_of(cl, struct btree, io); in btree_node_write_done()
385 struct btree *b = container_of(cl, struct btree, io); in btree_node_write_endio()
394 static void do_btree_node_write(struct btree *b) in do_btree_node_write()
459 void __bch_btree_node_write(struct btree *b, struct closure *parent) in __bch_btree_node_write()
490 void bch_btree_node_write(struct btree *b, struct closure *parent) in bch_btree_node_write()
508 static void bch_btree_node_write_sync(struct btree *b) in bch_btree_node_write_sync()
523 struct btree *b = container_of(to_delayed_work(w), struct btree, work); in btree_node_write_work()
531 static void bch_btree_leaf_dirty(struct btree *b, atomic_t *journal_ref) in bch_btree_leaf_dirty()
575 static void mca_data_free(struct btree *b) in mca_data_free()
585 static void mca_bucket_free(struct btree *b) in mca_bucket_free()
599 static void mca_data_alloc(struct btree *b, struct bkey *k, gfp_t gfp) in mca_data_alloc()
613 static struct btree *mca_bucket_alloc(struct cache_set *c, in mca_bucket_alloc()
620 struct btree *b = kzalloc(sizeof(struct btree), gfp); in mca_bucket_alloc()
638 static int mca_reap(struct btree *b, unsigned int min_order, bool flush) in mca_reap()
701 struct btree *b, *t; in bch_mca_scan()
747 b = list_first_entry(&c->btree_cache, struct btree, list); in bch_mca_scan()
780 struct btree *b; in bch_btree_cache_free()
801 b = list_first_entry(&c->btree_cache, struct btree, list); in bch_btree_cache_free()
817 struct btree, list); in bch_btree_cache_free()
871 static struct btree *mca_find(struct cache_set *c, struct bkey *k) in mca_find()
873 struct btree *b; in mca_find()
900 static struct btree *mca_cannibalize(struct cache_set *c, struct btree_op *op, in mca_cannibalize()
903 struct btree *b; in mca_cannibalize()
936 static struct btree *mca_alloc(struct cache_set *c, struct btree_op *op, in mca_alloc()
939 struct btree *b; in mca_alloc()
1016 struct btree *bch_btree_node_get(struct cache_set *c, struct btree_op *op, in bch_btree_node_get()
1018 struct btree *parent) in bch_btree_node_get()
1021 struct btree *b; in bch_btree_node_get()
1074 static void btree_node_prefetch(struct btree *parent, struct bkey *k) in btree_node_prefetch()
1076 struct btree *b; in btree_node_prefetch()
1091 static void btree_node_free(struct btree *b) in btree_node_free()
1127 struct btree *__bch_btree_node_alloc(struct cache_set *c, struct btree_op *op, in __bch_btree_node_alloc()
1129 struct btree *parent) in __bch_btree_node_alloc()
1132 struct btree *b = ERR_PTR(-EAGAIN); in __bch_btree_node_alloc()
1169 static struct btree *bch_btree_node_alloc(struct cache_set *c, in bch_btree_node_alloc()
1171 struct btree *parent) in bch_btree_node_alloc()
1176 static struct btree *btree_node_alloc_replacement(struct btree *b, in btree_node_alloc_replacement()
1179 struct btree *n = bch_btree_node_alloc(b->c, op, b->level, b->parent); in btree_node_alloc_replacement()
1191 static void make_btree_freeing_key(struct btree *b, struct bkey *k) in make_btree_freeing_key()
1210 static int btree_check_reserve(struct btree *b, struct btree_op *op) in btree_check_reserve()
1313 static bool btree_gc_mark_node(struct btree *b, struct gc_stat *gc) in btree_gc_mark_node()
1358 struct btree *b;
1362 static int bch_btree_insert_node(struct btree *b, struct btree_op *op,
1367 static int btree_gc_coalesce(struct btree *b, struct btree_op *op, in btree_gc_coalesce()
1371 struct btree *new_nodes[GC_MERGE_NODES]; in btree_gc_coalesce()
1534 static int btree_gc_rewrite_node(struct btree *b, struct btree_op *op, in btree_gc_rewrite_node()
1535 struct btree *replace) in btree_gc_rewrite_node()
1538 struct btree *n; in btree_gc_rewrite_node()
1570 static unsigned int btree_gc_count_keys(struct btree *b) in btree_gc_count_keys()
1608 static int btree_gc_recurse(struct btree *b, struct btree_op *op, in btree_gc_recurse()
1698 static int bch_btree_gc_root(struct btree *b, struct btree_op *op, in bch_btree_gc_root()
1701 struct btree *n = NULL; in bch_btree_gc_root()
1915 static int bch_btree_check_recurse(struct btree *b, struct btree_op *op) in bch_btree_check_recurse()
1942 ret = btree(check_recurse, p, b, op); in bch_btree_check_recurse()
2001 static bool btree_insert_key(struct btree *b, struct bkey *k, in btree_insert_key()
2020 static size_t insert_u64s_remaining(struct btree *b) in insert_u64s_remaining()
2033 static bool bch_btree_insert_keys(struct btree *b, struct btree_op *op, in bch_btree_insert_keys()
2075 static int btree_split(struct btree *b, struct btree_op *op, in btree_split()
2080 struct btree *n1, *n2 = NULL, *n3 = NULL; in btree_split()
2209 static int bch_btree_insert_node(struct btree *b, struct btree_op *op, in bch_btree_insert_node()
2265 int bch_btree_insert_check_key(struct btree *b, struct btree_op *op, in bch_btree_insert_check_key()
2310 static int btree_insert_fn(struct btree_op *b_op, struct btree *b) in btree_insert_fn()
2357 void bch_btree_set_root(struct btree *b) in bch_btree_set_root()
2383 static int bch_btree_map_nodes_recurse(struct btree *b, struct btree_op *op, in bch_btree_map_nodes_recurse()
2397 ret = btree(map_nodes_recurse, k, b, in bch_btree_map_nodes_recurse()
2418 static int bch_btree_map_keys_recurse(struct btree *b, struct btree_op *op, in bch_btree_map_keys_recurse()
2431 : btree(map_keys_recurse, k, b, op, from, fn, flags); in bch_btree_map_keys_recurse()
2477 static int refill_keybuf_fn(struct btree_op *op, struct btree *b, in refill_keybuf_fn()