/linux/fs/bcachefs/ |
H A D | btree_cache.c | 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() [all …]
|
H A D | btree_cache.h | 17 void __bch2_btree_node_hash_remove(struct btree_cache *, struct btree *); 18 void bch2_btree_node_hash_remove(struct btree_cache *, struct btree *); 20 int __bch2_btree_node_hash_insert(struct btree_cache *, struct btree *); 21 int bch2_btree_node_hash_insert(struct btree_cache *, struct btree *, 50 void bch2_fs_btree_cache_init_early(struct btree_cache *); 82 for ((_tbl) = rht_dereference_rcu((_c)->btree_cache.table.tbl, \ 83 &(_c)->btree_cache.table), \ 146 void bch2_btree_cache_to_text(struct printbuf *, const struct btree_cache *);
|
H A D | btree_update_interior.c | 253 mutex_lock(&c->btree_cache.lock); in bch2_btree_node_free_inmem() 254 bch2_btree_node_hash_remove(&c->btree_cache, b); in bch2_btree_node_free_inmem() 255 mutex_unlock(&c->btree_cache.lock); in bch2_btree_node_free_inmem() 287 mutex_lock(&c->btree_cache.lock); in bch2_btree_node_free_never_used() 288 __bch2_btree_node_hash_remove(&c->btree_cache, b); in bch2_btree_node_free_never_used() 289 mutex_unlock(&c->btree_cache.lock); in bch2_btree_node_free_never_used() 426 ret = bch2_btree_node_hash_insert(&c->btree_cache, b, level, as->btree_id); in bch2_btree_node_alloc() 1299 mutex_lock(&c->btree_cache.lock); in bch2_btree_set_root_inmem() 1301 mutex_unlock(&c->btree_cache.lock); in bch2_btree_set_root_inmem() 1912 mutex_lock(&c->btree_cache.lock); in __btree_increase_depth() [all …]
|
H A D | sysfs.c | 173 read_attribute(btree_cache); 247 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_size() 359 bch2_btree_cache_to_text(out, &c->btree_cache); in SHOW() 451 struct btree_cache *bc = &c->btree_cache; in STORE()
|
H A D | btree_io.h | 21 atomic_long_inc(&c->btree_cache.nr_dirty); in set_btree_node_dirty_acct() 27 atomic_long_dec(&c->btree_cache.nr_dirty); in clear_btree_node_dirty_acct()
|
H A D | btree_gc.c | 184 mutex_lock(&c->btree_cache.lock); in set_node_max() 185 __bch2_btree_node_hash_remove(&c->btree_cache, b); in set_node_max() 188 ret = __bch2_btree_node_hash_insert(&c->btree_cache, b); in set_node_max() 190 mutex_unlock(&c->btree_cache.lock); in set_node_max() 554 mutex_lock(&c->btree_cache.lock); in bch2_check_topology() 555 bch2_btree_node_hash_remove(&c->btree_cache, b); in bch2_check_topology() 556 mutex_unlock(&c->btree_cache.lock); in bch2_check_topology()
|
H A D | Makefile | 13 btree_cache.o \
|
H A D | backpointers.c | 763 c->btree_cache.pinned_nodes_mask[0] = btree_leaf_mask; in bch2_get_btree_in_memory_pos() 764 c->btree_cache.pinned_nodes_mask[1] = btree_interior_mask; in bch2_get_btree_in_memory_pos() 765 c->btree_cache.pinned_nodes_start = start; in bch2_get_btree_in_memory_pos() 766 c->btree_cache.pinned_nodes_end = *end = BBPOS_MAX; in bch2_get_btree_in_memory_pos() 782 c->btree_cache.pinned_nodes_end = *end = in bch2_get_btree_in_memory_pos()
|
H A D | journal_reclaim.c | 644 struct btree_cache *bc = &c->btree_cache; in __bch2_journal_reclaim()
|
H A D | bcachefs.h | 814 struct btree_cache btree_cache; member
|
H A D | btree_io.c | 1743 BUG_ON(bch2_btree_node_hash_insert(&c->btree_cache, b, level, id)); in __bch2_btree_root_read() 1752 mutex_lock(&c->btree_cache.lock); in __bch2_btree_root_read() 1753 bch2_btree_node_hash_remove(&c->btree_cache, b); in __bch2_btree_root_read() 1754 mutex_unlock(&c->btree_cache.lock); in __bch2_btree_root_read() 2033 atomic_long_dec(&c->btree_cache.nr_dirty); in __bch2_btree_node_write()
|
H A D | debug.c | 522 tbl = rht_dereference_rcu(c->btree_cache.table.tbl, in bch2_cached_btree_nodes_read() 523 &c->btree_cache.table); in bch2_cached_btree_nodes_read()
|
H A D | btree_types.h | 166 struct btree_cache { struct
|
H A D | super.c | 375 BUG_ON(atomic_long_read(&c->btree_cache.nr_dirty)); in bch2_fs_read_only() 819 bch2_fs_btree_cache_init_early(&c->btree_cache); in bch2_fs_alloc()
|
/linux/drivers/md/bcache/ |
H A D | btree.c | 556 list_move(&b->list, &b->c->btree_cache); in mca_data_alloc() 715 list_for_each_entry_safe_reverse(b, t, &c->btree_cache, list) { in bch_mca_scan() 762 list_move(&c->verify_data->list, &c->btree_cache); in bch_btree_cache_free() 768 &c->btree_cache); in bch_btree_cache_free() 770 while (!list_empty(&c->btree_cache)) { in bch_btree_cache_free() 771 b = list_first_entry(&c->btree_cache, struct btree, list); in bch_btree_cache_free() 804 list_splice_init(&c->btree_cache, in bch_btree_cache_alloc() 896 list_for_each_entry_reverse(b, &c->btree_cache, list) in mca_cannibalize() 900 list_for_each_entry_reverse(b, &c->btree_cache, list) in mca_cannibalize() 966 list_move(&b->list, &c->btree_cache); in mca_alloc()
|
H A D | bcache.h | 581 struct list_head btree_cache; member
|
H A D | super.c | 1722 list_add(&c->root->list, &c->btree_cache); in CLOSURE_CALLBACK() 1729 list_for_each_entry(b, &c->btree_cache, list) { in CLOSURE_CALLBACK() 1905 INIT_LIST_HEAD(&c->btree_cache); in bch_cache_set_alloc()
|
H A D | journal.c | 455 list_for_each_entry_safe_reverse(b, t, &c->btree_cache, list) { in btree_flush_write()
|
H A D | sysfs.c | 690 list_for_each_entry(b, &c->btree_cache, list) in bch_cache_size()
|