#ifndef _BCACHEFS_BTREE_TYPES_H
#define _BCACHEFS_BTREE_TYPES_H
#include <linux/list.h>
#include <linux/rhashtable.h>
#include "bbpos_types.h"
#include "btree_key_cache_types.h"
#include "buckets_types.h"
#include "darray.h"
#include "errcode.h"
#include "journal_types.h"
#include "replicas_types.h"
#include "six.h"
struct open_bucket;
struct btree_update;
struct btree_trans;
#define MAX_BSETS …
struct btree_nr_keys { … };
struct bset_tree { … };
struct btree_write { … };
struct btree_alloc { … };
struct btree_bkey_cached_common { … };
struct btree { … };
struct btree_cache { … };
struct btree_node_iter { … };
#define BTREE_ITER_FLAGS() … \
#define STR_HASH_FLAGS() …
#define BTREE_UPDATE_FLAGS() …
#define BTREE_TRIGGER_FLAGS() …
enum { … };
enum btree_iter_update_trigger_flags { … };
enum btree_path_uptodate { … };
#if defined(CONFIG_BCACHEFS_LOCK_TIME_STATS) || defined(CONFIG_BCACHEFS_DEBUG)
#define TRACK_PATH_ALLOCATED
#endif
btree_path_idx_t;
struct btree_path { … };
static inline struct btree_path_level *path_l(struct btree_path *path)
{ … }
static inline unsigned long btree_path_ip_allocated(struct btree_path *path)
{ … }
struct btree_iter { … };
#define BKEY_CACHED_ACCESSED …
#define BKEY_CACHED_DIRTY …
struct bkey_cached { … };
static inline struct bpos btree_node_pos(struct btree_bkey_cached_common *b)
{ … }
struct btree_insert_entry { … };
#define BTREE_ITER_INITIAL …
#define BTREE_ITER_NORMAL_LIMIT …
#define BTREE_ITER_MAX …
struct btree_trans_commit_hook;
btree_trans_commit_hook_fn;
struct btree_trans_commit_hook { … };
#define BTREE_TRANS_MEM_MAX …
#define BTREE_TRANS_MAX_LOCK_HOLD_TIME_NS …
struct btree_trans_paths { … };
struct btree_trans { … };
static inline struct btree_path *btree_iter_path(struct btree_trans *trans, struct btree_iter *iter)
{ … }
static inline struct btree_path *btree_iter_key_cache_path(struct btree_trans *trans, struct btree_iter *iter)
{ … }
#define BCH_BTREE_WRITE_TYPES() …
enum btree_write_type { … };
#define BTREE_WRITE_TYPE_MASK …
#define BTREE_WRITE_TYPE_BITS …
#define BTREE_FLAGS() …
enum btree_flags { … };
#define x …
BTREE_FLAGS(…)
#undef x
static inline struct btree_write *btree_current_write(struct btree *b)
{ … }
static inline struct btree_write *btree_prev_write(struct btree *b)
{ … }
static inline struct bset_tree *bset_tree_last(struct btree *b)
{ … }
static inline void *
__btree_node_offset_to_ptr(const struct btree *b, u16 offset)
{ … }
static inline u16
__btree_node_ptr_to_offset(const struct btree *b, const void *p)
{ … }
static inline struct bset *bset(const struct btree *b,
const struct bset_tree *t)
{ … }
static inline void set_btree_bset_end(struct btree *b, struct bset_tree *t)
{ … }
static inline void set_btree_bset(struct btree *b, struct bset_tree *t,
const struct bset *i)
{ … }
static inline struct bset *btree_bset_first(struct btree *b)
{ … }
static inline struct bset *btree_bset_last(struct btree *b)
{ … }
static inline u16
__btree_node_key_to_offset(const struct btree *b, const struct bkey_packed *k)
{ … }
static inline struct bkey_packed *
__btree_node_offset_to_key(const struct btree *b, u16 k)
{ … }
static inline unsigned btree_bkey_first_offset(const struct bset_tree *t)
{ … }
#define btree_bkey_first(_b, _t) …
#define btree_bkey_last(_b, _t) …
static inline unsigned bset_u64s(struct bset_tree *t)
{ … }
static inline unsigned bset_dead_u64s(struct btree *b, struct bset_tree *t)
{ … }
static inline unsigned bset_byte_offset(struct btree *b, void *i)
{ … }
enum btree_node_type { … };
static inline enum btree_node_type __btree_node_type(unsigned level, enum btree_id id)
{ … }
static inline enum btree_node_type btree_node_type(struct btree *b)
{ … }
const char *bch2_btree_node_type_str(enum btree_node_type);
#define BTREE_NODE_TYPE_HAS_TRANS_TRIGGERS …
#define BTREE_NODE_TYPE_HAS_ATOMIC_TRIGGERS …
#define BTREE_NODE_TYPE_HAS_TRIGGERS …
static inline bool btree_node_type_has_trans_triggers(enum btree_node_type type)
{ … }
static inline bool btree_node_type_has_atomic_triggers(enum btree_node_type type)
{ … }
static inline bool btree_node_type_has_triggers(enum btree_node_type type)
{ … }
static inline bool btree_node_type_is_extents(enum btree_node_type type)
{ … }
static inline bool btree_id_is_extents(enum btree_id btree)
{ … }
static inline bool btree_type_has_snapshots(enum btree_id id)
{ … }
static inline bool btree_type_has_snapshot_field(enum btree_id id)
{ … }
static inline bool btree_type_has_ptrs(enum btree_id id)
{ … }
struct btree_root { … };
enum btree_gc_coalesce_fail_reason { … };
enum btree_node_sibling { … };
struct get_locks_fail { … };
#endif