Lines Matching full:live

52 	struct btree_cache *bc = container_of(list, struct btree_cache, live[list->idx]);  in btree_cache_can_free()
228 list_move(&b->list, &bc->live[1].list); in bch2_node_pin()
229 bc->live[0].nr--; in bch2_node_pin()
230 bc->live[1].nr++; in bch2_node_pin()
244 list_for_each_entry_safe(b, n, &bc->live[1].list, list) { in bch2_btree_cache_unpin()
246 list_move(&b->list, &bc->live[0].list); in bch2_btree_cache_unpin()
247 bc->live[0].nr++; in bch2_btree_cache_unpin()
248 bc->live[1].nr--; in bch2_btree_cache_unpin()
268 --bc->live[btree_node_pinned(b)].nr; in __bch2_btree_node_hash_remove()
295 list_add_tail(&b->list, &bc->live[p].list); in __bch2_btree_node_hash_insert()
296 bc->live[p].nr++; in __bch2_btree_node_hash_insert()
466 struct btree_cache *bc = container_of(list, struct btree_cache, live[list->idx]); in bch2_btree_cache_scan()
582 shrinker_free(bc->live[1].shrink); in bch2_fs_btree_cache_exit()
583 shrinker_free(bc->live[0].shrink); in bch2_fs_btree_cache_exit()
590 list_move(&c->verify_data->list, &bc->live[0].list); in bch2_fs_btree_cache_exit()
598 list_add(&r->b->list, &bc->live[0].list); in bch2_fs_btree_cache_exit()
601 list_for_each_entry_safe(b, t, &bc->live[1].list, list) in bch2_fs_btree_cache_exit()
603 list_for_each_entry_safe(b, t, &bc->live[0].list, list) in bch2_fs_btree_cache_exit()
629 BUG_ON(bc->live[0].nr); in bch2_fs_btree_cache_exit()
630 BUG_ON(bc->live[1].nr); in bch2_fs_btree_cache_exit()
656 list_splice_init(&bc->live[0].list, &bc->freeable); in bch2_fs_btree_cache_init()
663 bc->live[0].shrink = shrink; in bch2_fs_btree_cache_init()
667 shrink->private_data = &bc->live[0]; in bch2_fs_btree_cache_init()
673 bc->live[1].shrink = shrink; in bch2_fs_btree_cache_init()
677 shrink->private_data = &bc->live[1]; in bch2_fs_btree_cache_init()
688 for (unsigned i = 0; i < ARRAY_SIZE(bc->live); i++) { in bch2_fs_btree_cache_init_early()
689 bc->live[i].idx = i; in bch2_fs_btree_cache_init_early()
690 INIT_LIST_HEAD(&bc->live[i].list); in bch2_fs_btree_cache_init_early()
753 for (unsigned i = 0; i < ARRAY_SIZE(bc->live); i++) in btree_node_cannibalize()
754 list_for_each_entry_reverse(b, &bc->live[i].list, list) in btree_node_cannibalize()
759 for (unsigned i = 0; i < ARRAY_SIZE(bc->live); i++) in btree_node_cannibalize()
760 list_for_each_entry_reverse(b, &bc->live[i].list, list) in btree_node_cannibalize()
1474 prt_btree_cache_line(out, c, "live:", bc->live[0].nr); in bch2_btree_cache_to_text()
1475 prt_btree_cache_line(out, c, "pinned:", bc->live[1].nr); in bch2_btree_cache_to_text()