Lines Matching refs:btree_cache
47 c->btree_cache.nr_reserve = reserve; in bch2_recalc_btree_reserve()
52 struct btree_cache *bc = container_of(list, struct btree_cache, live[list->idx]); in btree_cache_can_free()
60 static void btree_node_to_freedlist(struct btree_cache *bc, struct btree *b) in btree_node_to_freedlist()
70 static void __bch2_btree_node_to_freelist(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_to_freelist()
81 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_to_freelist()
91 static void __btree_node_data_free(struct btree_cache *bc, struct btree *b) in __btree_node_data_free()
122 static void btree_node_data_free(struct btree_cache *bc, struct btree *b) in btree_node_data_free()
191 struct btree_cache *bc = &c->btree_cache; in __bch2_btree_node_mem_alloc()
209 static inline bool __btree_node_pinned(struct btree_cache *bc, struct btree *b) in __btree_node_pinned()
222 struct btree_cache *bc = &c->btree_cache; in bch2_node_pin()
237 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_unpin()
241 c->btree_cache.pinned_nodes_mask[0] = 0; in bch2_btree_cache_unpin()
242 c->btree_cache.pinned_nodes_mask[1] = 0; in bch2_btree_cache_unpin()
256 void __bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_hash_remove()
272 void bch2_btree_node_hash_remove(struct btree_cache *bc, struct btree *b) in bch2_btree_node_hash_remove()
278 int __bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b) in __bch2_btree_node_hash_insert()
300 int bch2_btree_node_hash_insert(struct btree_cache *bc, struct btree *b, in bch2_btree_node_hash_insert()
327 mutex_lock(&c->btree_cache.lock); in bch2_btree_node_update_key_early()
329 bch2_btree_node_hash_remove(&c->btree_cache, b); in bch2_btree_node_update_key_early()
332 ret = __bch2_btree_node_hash_insert(&c->btree_cache, b); in bch2_btree_node_update_key_early()
335 mutex_unlock(&c->btree_cache.lock); in bch2_btree_node_update_key_early()
343 static inline struct btree *btree_cache_find(struct btree_cache *bc, in btree_cache_find()
357 struct btree_cache *bc = &c->btree_cache; in __btree_node_reclaim()
466 struct btree_cache *bc = container_of(list, struct btree_cache, live[list->idx]); in bch2_btree_cache_scan()
467 struct bch_fs *c = container_of(bc, struct bch_fs, btree_cache); in bch2_btree_cache_scan()
578 struct btree_cache *bc = &c->btree_cache; in bch2_fs_btree_cache_exit()
614 atomic_long_read(&c->btree_cache.nr_dirty)); in bch2_fs_btree_cache_exit()
639 struct btree_cache *bc = &c->btree_cache; in bch2_fs_btree_cache_init()
685 void bch2_fs_btree_cache_init_early(struct btree_cache *bc) in bch2_fs_btree_cache_init_early()
706 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_cannibalize_unlock()
718 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_cannibalize_lock()
750 struct btree_cache *bc = &c->btree_cache; in btree_node_cannibalize()
776 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_mem_alloc()
903 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_fill()
1044 struct btree_cache *bc = &c->btree_cache; in __bch2_btree_node_get()
1243 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_get_noiter()
1326 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_prefetch()
1348 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_evict()
1467 void bch2_btree_cache_to_text(struct printbuf *out, const struct btree_cache *bc) in bch2_btree_cache_to_text()
1469 struct bch_fs *c = container_of(bc, struct bch_fs, btree_cache); in bch2_btree_cache_to_text()