Lines Matching refs:btree
63 static void btree_node_to_freedlist(struct btree_cache *bc, struct btree *b) in btree_node_to_freedlist()
73 static void __bch2_btree_node_to_freelist(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_to_freelist()
82 void bch2_btree_node_to_freelist(struct bch_fs *c, struct btree *b) in bch2_btree_node_to_freelist()
94 static void __btree_node_data_free(struct btree_cache *bc, struct btree *b) in __btree_node_data_free()
125 static void btree_node_data_free(struct btree_cache *bc, struct btree *b) in btree_node_data_free()
136 const struct btree *b = obj; in bch2_btree_cache_cmp_fn()
143 .head_offset = offsetof(struct btree, hash),
144 .key_offset = offsetof(struct btree, hash_val),
150 static int btree_node_data_alloc(struct bch_fs *c, struct btree *b, gfp_t gfp) in btree_node_data_alloc()
177 static struct btree *__btree_node_mem_alloc(struct bch_fs *c, gfp_t gfp) in __btree_node_mem_alloc()
179 struct btree *b; in __btree_node_mem_alloc()
181 b = kzalloc(sizeof(struct btree), gfp); in __btree_node_mem_alloc()
192 struct btree *__bch2_btree_node_mem_alloc(struct bch_fs *c) in __bch2_btree_node_mem_alloc()
195 struct btree *b; in __bch2_btree_node_mem_alloc()
212 static inline bool __btree_node_pinned(struct btree_cache *bc, struct btree *b) in __btree_node_pinned()
223 void bch2_node_pin(struct bch_fs *c, struct btree *b) in bch2_node_pin()
240 struct btree *b, *n; in bch2_btree_cache_unpin()
258 void __bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_hash_remove()
274 void bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b) in bch2_btree_node_hash_remove()
280 int __bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_hash_insert()
302 int bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b, in bch2_btree_node_hash_insert()
316 enum btree_id btree, unsigned level, in bch2_btree_node_update_key_early() argument
320 struct btree *b; in bch2_btree_node_update_key_early()
327 b = bch2_btree_node_get_noiter(trans, tmp.k, btree, level, true); in bch2_btree_node_update_key_early()
345 static inline struct btree *btree_cache_find(struct btree_cache *bc, in btree_cache_find()
357 static int __btree_node_reclaim(struct bch_fs *c, struct btree *b, bool flush, bool shrinker_counte… in __btree_node_reclaim()
454 static int btree_node_reclaim(struct bch_fs *c, struct btree *b, bool shrinker_counter) in btree_node_reclaim()
459 static int btree_node_write_and_reclaim(struct bch_fs *c, struct btree *b) in btree_node_write_and_reclaim()
470 struct btree *b, *t; in bch2_btree_cache_scan()
581 struct btree *b, *t; in bch2_fs_btree_cache_exit()
750 static struct btree *btree_node_cannibalize(struct bch_fs *c) in btree_node_cannibalize()
753 struct btree *b; in btree_node_cannibalize()
775 struct btree *bch2_btree_node_mem_alloc(struct btree_trans *trans, bool pcpu_read_locks) in bch2_btree_node_mem_alloc()
782 struct btree *b, *b2; in bch2_btree_node_mem_alloc()
897 static noinline struct btree *bch2_btree_node_fill(struct btree_trans *trans, in bch2_btree_node_fill()
907 struct btree *b; in bch2_btree_node_fill()
1002 static noinline void btree_bad_header(struct bch_fs *c, struct btree *b) in btree_bad_header()
1028 static inline void btree_check_header(struct bch_fs *c, struct btree *b) in btree_check_header()
1039 static struct btree *__bch2_btree_node_get(struct btree_trans *trans, struct btree_path *path, in __bch2_btree_node_get()
1046 struct btree *b; in __bch2_btree_node_get()
1163 struct btree *bch2_btree_node_get(struct btree_trans *trans, struct btree_path *path, in bch2_btree_node_get()
1169 struct btree *b; in bch2_btree_node_get()
1237 struct btree *bch2_btree_node_get_noiter(struct btree_trans *trans, in bch2_btree_node_get_noiter()
1245 struct btree *b; in bch2_btree_node_get_noiter()
1332 struct btree *b = btree_cache_find(bc, k); in bch2_btree_node_prefetch()
1350 struct btree *b; in bch2_btree_node_evict()
1389 const char *bch2_btree_id_str(enum btree_id btree) in bch2_btree_id_str() argument
1391 return btree < BTREE_ID_NR ? __bch2_btree_ids[btree] : "(unknown)"; in bch2_btree_id_str()
1394 void bch2_btree_id_to_text(struct printbuf *out, enum btree_id btree) in bch2_btree_id_to_text() argument
1396 if (btree < BTREE_ID_NR) in bch2_btree_id_to_text()
1397 prt_str(out, __bch2_btree_ids[btree]); in bch2_btree_id_to_text()
1399 prt_printf(out, "(unknown btree %u)", btree); in bch2_btree_id_to_text()
1402 void bch2_btree_id_level_to_text(struct printbuf *out, enum btree_id btree, unsigned level) in bch2_btree_id_level_to_text() argument
1405 bch2_btree_id_to_text(out, btree); in bch2_btree_id_level_to_text()
1410 enum btree_id btree, unsigned level, struct bkey_s_c k) in __bch2_btree_pos_to_text() argument
1412 bch2_btree_id_to_text(out, btree); in __bch2_btree_pos_to_text()
1414 struct btree_root *r = bch2_btree_id_root(c, btree); in __bch2_btree_pos_to_text()
1424 void bch2_btree_pos_to_text(struct printbuf *out, struct bch_fs *c, const struct btree *b) in bch2_btree_pos_to_text()
1429 void bch2_btree_node_to_text(struct printbuf *out, struct bch_fs *c, const struct btree *b) in bch2_btree_node_to_text()