| /linux-6.15/fs/bcachefs/ |
| H A D | btree_cache.c | 84 struct btree_cache *bc = &c->btree_cache; in bch2_btree_node_to_freelist() 194 struct btree_cache *bc = &c->btree_cache; in __bch2_btree_node_mem_alloc() 225 struct btree_cache *bc = &c->btree_cache; in bch2_node_pin() 239 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_unpin() 359 struct btree_cache *bc = &c->btree_cache; in __btree_node_reclaim() 580 struct btree_cache *bc = &c->btree_cache; in bch2_fs_btree_cache_exit() 642 struct btree_cache *bc = &c->btree_cache; in bch2_fs_btree_cache_init() 709 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_cannibalize_unlock() 721 struct btree_cache *bc = &c->btree_cache; in bch2_btree_cache_cannibalize_lock() 753 struct btree_cache *bc = &c->btree_cache; in btree_node_cannibalize() [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), \ 154 void bch2_btree_cache_to_text(struct printbuf *, const struct btree_cache *);
|
| H A D | btree_update_interior.c | 243 mutex_lock(&c->btree_cache.lock); in bch2_btree_node_free_inmem() 245 mutex_unlock(&c->btree_cache.lock); in bch2_btree_node_free_inmem() 271 mutex_lock(&c->btree_cache.lock); in bch2_btree_node_free_never_used() 273 mutex_unlock(&c->btree_cache.lock); in bch2_btree_node_free_never_used() 1282 mutex_lock(&c->btree_cache.lock); in bch2_btree_set_root_inmem() 1284 mutex_unlock(&c->btree_cache.lock); in bch2_btree_set_root_inmem() 1935 mutex_lock(&c->btree_cache.lock); in __btree_increase_depth() 1937 mutex_unlock(&c->btree_cache.lock); in __btree_increase_depth() 2488 mutex_lock(&c->btree_cache.lock); in __bch2_btree_node_update_key() 2496 mutex_unlock(&c->btree_cache.lock); in __bch2_btree_node_update_key() [all …]
|
| H A D | sysfs.c | 172 read_attribute(btree_cache); 235 struct btree_cache *bc = &c->btree_cache; in BCH_TIME_STATS() 343 bch2_btree_cache_to_text(out, &c->btree_cache); in SHOW() 412 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 | 207 mutex_lock(&c->btree_cache.lock); in set_node_max() 208 __bch2_btree_node_hash_remove(&c->btree_cache, b); in set_node_max() 211 ret = __bch2_btree_node_hash_insert(&c->btree_cache, b); in set_node_max() 213 mutex_unlock(&c->btree_cache.lock); in set_node_max() 581 mutex_lock(&c->btree_cache.lock); in bch2_check_topology() 582 bch2_btree_node_hash_remove(&c->btree_cache, b); in bch2_check_topology() 583 mutex_unlock(&c->btree_cache.lock); in bch2_check_topology()
|
| H A D | Makefile | 13 btree_cache.o \
|
| H A D | backpointers.c | 760 c->btree_cache.pinned_nodes_mask[0] = btree_leaf_mask; in bch2_get_btree_in_memory_pos() 761 c->btree_cache.pinned_nodes_mask[1] = btree_interior_mask; in bch2_get_btree_in_memory_pos() 762 c->btree_cache.pinned_nodes_start = start; in bch2_get_btree_in_memory_pos() 763 c->btree_cache.pinned_nodes_end = *end = BBPOS_MAX; in bch2_get_btree_in_memory_pos() 779 c->btree_cache.pinned_nodes_end = *end = in bch2_get_btree_in_memory_pos()
|
| H A D | bcachefs.h | 826 struct btree_cache btree_cache; member
|
| H A D | journal_reclaim.c | 678 struct btree_cache *bc = &c->btree_cache; in __bch2_journal_reclaim()
|
| H A D | debug.c | 526 tbl = rht_dereference_rcu(c->btree_cache.table.tbl, in bch2_cached_btree_nodes_read() 527 &c->btree_cache.table); in bch2_cached_btree_nodes_read()
|
| H A D | btree_io.c | 1795 BUG_ON(bch2_btree_node_hash_insert(&c->btree_cache, b, level, id)); in __bch2_btree_root_read() 1804 mutex_lock(&c->btree_cache.lock); in __bch2_btree_root_read() 1805 bch2_btree_node_hash_remove(&c->btree_cache, b); in __bch2_btree_root_read() 1806 mutex_unlock(&c->btree_cache.lock); in __bch2_btree_root_read() 2299 atomic_long_dec(&c->btree_cache.nr_dirty); in __bch2_btree_node_write()
|
| H A D | btree_types.h | 166 struct btree_cache { struct
|
| H A D | super.c | 371 BUG_ON(atomic_long_read(&c->btree_cache.nr_dirty)); in bch2_fs_read_only() 820 bch2_fs_btree_cache_init_early(&c->btree_cache); in bch2_fs_alloc()
|
| /linux-6.15/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()
|