Lines Matching refs:btree

72 struct btree {
90 * Sets of sorted keys - the real btree node - plus a binary search tree
93 * to the memory we have allocated for this btree node. Additionally,
94 * set[0]->data points to the entire btree node as it exists on disk.
106 /* Key/pointer for this btree node */
129 * If a btree node isn't reachable yet, we don't want to kick off
145 * We never free a struct btree, except on shutdown - we just put it on
148 * dominated by buffers that hold the actual btree node data and those
154 * common to delete and allocate btree nodes in quick succession. It
170 * If we need to allocate memory for a new btree node and that
171 * allocation fails, we can cannibalize another node in the btree cache
200 * Causes the btree iterator code to prefetch additional btree nodes from disk:
255 struct btree *b;
283 * @level - current btree depth
284 * @locks_want - btree level below which we start taking intent locks
341 ? container_of(b, struct btree, c)->key.k.p
356 * to the size of the key being overwritten in the btree:
367 /* Number of btree paths we preallocate, usually enough */
372 * bug (leaking/duplicated btree paths).
520 /* First bits for btree node write type */
528 static inline bool btree_node_ ## flag(struct btree *b) \
531 static inline void set_btree_node_ ## flag(struct btree *b) \
534 static inline void clear_btree_node_ ## flag(struct btree *b) \
540 static inline struct btree_write *btree_current_write(struct btree *b)
545 static inline struct btree_write *btree_prev_write(struct btree *b)
550 static inline struct bset_tree *bset_tree_last(struct btree *b)
557 __btree_node_offset_to_ptr(const struct btree *b, u16 offset)
563 __btree_node_ptr_to_offset(const struct btree *b, const void *p)
571 static inline struct bset *bset(const struct btree *b,
577 static inline void set_btree_bset_end(struct btree *b, struct bset_tree *t)
583 static inline void set_btree_bset(struct btree *b, struct bset_tree *t,
590 static inline struct bset *btree_bset_first(struct btree *b)
595 static inline struct bset *btree_bset_last(struct btree *b)
601 __btree_node_key_to_offset(const struct btree *b, const struct bkey_packed *k)
607 __btree_node_offset_to_key(const struct btree *b, u16 k)
639 static inline unsigned bset_dead_u64s(struct btree *b, struct bset_tree *t)
644 static inline unsigned bset_byte_offset(struct btree *b, void *i)
657 /* Type of a key in btree @id at level @level: */
664 static inline enum btree_node_type btree_node_type(struct btree *b)
706 static inline bool btree_id_is_extents(enum btree_id btree)
708 return btree_node_type_is_extents(__btree_node_type(0, btree));
745 struct btree *b;
767 struct btree *b;