summaryrefslogtreecommitdiff
path: root/libbcache/btree_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'libbcache/btree_cache.h')
-rw-r--r--libbcache/btree_cache.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/libbcache/btree_cache.h b/libbcache/btree_cache.h
index 4d67704b..0d1c00c4 100644
--- a/libbcache/btree_cache.h
+++ b/libbcache/btree_cache.h
@@ -8,22 +8,22 @@ struct btree_iter;
extern const char * const bch_btree_ids[];
-void bch_recalc_btree_reserve(struct cache_set *);
+void bch_recalc_btree_reserve(struct bch_fs *);
-void mca_hash_remove(struct cache_set *, struct btree *);
-int mca_hash_insert(struct cache_set *, struct btree *,
+void mca_hash_remove(struct bch_fs *, struct btree *);
+int mca_hash_insert(struct bch_fs *, struct btree *,
unsigned, enum btree_id);
-void mca_cannibalize_unlock(struct cache_set *);
-int mca_cannibalize_lock(struct cache_set *, struct closure *);
+void mca_cannibalize_unlock(struct bch_fs *);
+int mca_cannibalize_lock(struct bch_fs *, struct closure *);
-struct btree *mca_alloc(struct cache_set *);
+struct btree *mca_alloc(struct bch_fs *);
struct btree *bch_btree_node_get(struct btree_iter *, const struct bkey_i *,
unsigned, enum six_lock_type);
-void bch_fs_btree_exit(struct cache_set *);
-int bch_fs_btree_init(struct cache_set *);
+void bch_fs_btree_exit(struct bch_fs *);
+int bch_fs_btree_init(struct bch_fs *);
#define for_each_cached_btree(_b, _c, _tbl, _iter, _pos) \
for ((_tbl) = rht_dereference_rcu((_c)->btree_cache_table.tbl, \
@@ -31,27 +31,27 @@ int bch_fs_btree_init(struct cache_set *);
_iter = 0; _iter < (_tbl)->size; _iter++) \
rht_for_each_entry_rcu((_b), (_pos), _tbl, _iter, hash)
-static inline size_t btree_bytes(struct cache_set *c)
+static inline size_t btree_bytes(struct bch_fs *c)
{
return c->sb.btree_node_size << 9;
}
-static inline size_t btree_max_u64s(struct cache_set *c)
+static inline size_t btree_max_u64s(struct bch_fs *c)
{
return (btree_bytes(c) - sizeof(struct btree_node)) / sizeof(u64);
}
-static inline size_t btree_pages(struct cache_set *c)
+static inline size_t btree_pages(struct bch_fs *c)
{
return c->sb.btree_node_size >> (PAGE_SHIFT - 9);
}
-static inline size_t btree_page_order(struct cache_set *c)
+static inline size_t btree_page_order(struct bch_fs *c)
{
return ilog2(btree_pages(c));
}
-static inline unsigned btree_blocks(struct cache_set *c)
+static inline unsigned btree_blocks(struct bch_fs *c)
{
return c->sb.btree_node_size >> c->block_bits;
}
@@ -65,7 +65,7 @@ static inline unsigned btree_blocks(struct cache_set *c)
#define btree_node_root(_c, _b) ((_c)->btree_roots[(_b)->btree_id].b)
-int bch_print_btree_node(struct cache_set *, struct btree *,
+int bch_print_btree_node(struct bch_fs *, struct btree *,
char *, size_t);
#endif /* _BCACHE_BTREE_CACHE_H */