btree.h (88b9f8c426f35e04738220c1bc05dd1ea1b513a3) btree.h (78b77bf8b20431f8ad8a4db7e3120103bd922337)
1#ifndef _BCACHE_BTREE_H
2#define _BCACHE_BTREE_H
3
4/*
5 * THE BTREE:
6 *
7 * At a high level, bcache's btree is relatively standard b+ tree. All keys and
8 * pointers are in the leaves; interior nodes only have pointers to the child

--- 278 unchanged lines hidden (view full) ---

287
288static inline void rw_unlock(bool w, struct btree *b)
289{
290 if (w)
291 b->seq++;
292 (w ? up_write : up_read)(&b->lock);
293}
294
1#ifndef _BCACHE_BTREE_H
2#define _BCACHE_BTREE_H
3
4/*
5 * THE BTREE:
6 *
7 * At a high level, bcache's btree is relatively standard b+ tree. All keys and
8 * pointers are in the leaves; interior nodes only have pointers to the child

--- 278 unchanged lines hidden (view full) ---

287
288static inline void rw_unlock(bool w, struct btree *b)
289{
290 if (w)
291 b->seq++;
292 (w ? up_write : up_read)(&b->lock);
293}
294
295void bch_btree_node_read(struct btree *);
295void bch_btree_node_read_done(struct btree *);
296void bch_btree_node_write(struct btree *, struct closure *);
297
298void bch_btree_set_root(struct btree *);
299struct btree *bch_btree_node_alloc(struct cache_set *, int, bool);
300struct btree *bch_btree_node_get(struct cache_set *, struct bkey *, int, bool);
301
302int bch_btree_insert_check_key(struct btree *, struct btree_op *,
303 struct bkey *);

--- 59 unchanged lines hidden ---
296void bch_btree_node_write(struct btree *, struct closure *);
297
298void bch_btree_set_root(struct btree *);
299struct btree *bch_btree_node_alloc(struct cache_set *, int, bool);
300struct btree *bch_btree_node_get(struct cache_set *, struct bkey *, int, bool);
301
302int bch_btree_insert_check_key(struct btree *, struct btree_op *,
303 struct bkey *);

--- 59 unchanged lines hidden ---