summaryrefslogtreecommitdiff
path: root/fs/bcachefs/bset.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-02 19:15:18 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:46 -0400
commitd108efc2541590a0a086f27b1b703e59a84fafb2 (patch)
treecd3e0334a501d3fe4254c203904e80fe96d48ed9 /fs/bcachefs/bset.h
parentae1ede5893bd9b46f40cc9d1148321206369a9f2 (diff)
downloadlwn-d108efc2541590a0a086f27b1b703e59a84fafb2.tar.gz
lwn-d108efc2541590a0a086f27b1b703e59a84fafb2.zip
bcachefs: add const annotations to bset.c
perhaps a bit silly, but some debug assertions we want to add need const propagated a bit more. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/bset.h')
-rw-r--r--fs/bcachefs/bset.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/bset.h b/fs/bcachefs/bset.h
index 21e4ed4eacc3..5389e4f4f350 100644
--- a/fs/bcachefs/bset.h
+++ b/fs/bcachefs/bset.h
@@ -190,17 +190,17 @@ static inline enum bset_aux_tree_type bset_aux_tree_type(const struct bset_tree
#define BSET_CACHELINE 128
-static inline size_t btree_keys_cachelines(struct btree *b)
+static inline size_t btree_keys_cachelines(const struct btree *b)
{
return (1U << b->byte_order) / BSET_CACHELINE;
}
-static inline size_t btree_aux_data_bytes(struct btree *b)
+static inline size_t btree_aux_data_bytes(const struct btree *b)
{
return btree_keys_cachelines(b) * 8;
}
-static inline size_t btree_aux_data_u64s(struct btree *b)
+static inline size_t btree_aux_data_u64s(const struct btree *b)
{
return btree_aux_data_bytes(b) / sizeof(u64);
}