2017-03-17 06:18:50 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _BCACHEFS_BTREE_ITER_H
|
|
|
|
#define _BCACHEFS_BTREE_ITER_H
|
|
|
|
|
2019-01-13 21:02:22 +00:00
|
|
|
#include "bset.h"
|
2017-03-17 06:18:50 +00:00
|
|
|
#include "btree_types.h"
|
|
|
|
|
|
|
|
static inline void btree_iter_set_dirty(struct btree_iter *iter,
|
|
|
|
enum btree_iter_uptodate u)
|
|
|
|
{
|
|
|
|
iter->uptodate = max_t(unsigned, iter->uptodate, u);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct btree *btree_iter_node(struct btree_iter *iter,
|
|
|
|
unsigned level)
|
|
|
|
{
|
|
|
|
return level < BTREE_MAX_DEPTH ? iter->l[level].b : NULL;
|
|
|
|
}
|
|
|
|
|
2020-06-06 16:28:01 +00:00
|
|
|
static inline bool btree_node_lock_seq_matches(const struct btree_iter *iter,
|
|
|
|
const struct btree *b, unsigned level)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* We don't compare the low bits of the lock sequence numbers because
|
|
|
|
* @iter might have taken a write lock on @b, and we don't want to skip
|
|
|
|
* the linked iterator if the sequence numbers were equal before taking
|
|
|
|
* that write lock. The lock sequence number is incremented by taking
|
|
|
|
* and releasing write locks and is even when unlocked:
|
|
|
|
*/
|
|
|
|
return iter->l[level].lock_seq >> 1 == b->c.lock.state.seq >> 1;
|
|
|
|
}
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
static inline struct btree *btree_node_parent(struct btree_iter *iter,
|
|
|
|
struct btree *b)
|
|
|
|
{
|
2020-06-06 16:28:01 +00:00
|
|
|
return btree_iter_node(iter, b->c.level + 1);
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
2019-03-28 02:03:30 +00:00
|
|
|
static inline bool btree_trans_has_multiple_iters(const struct btree_trans *trans)
|
|
|
|
{
|
|
|
|
return hweight64(trans->iters_linked) > 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int btree_iter_err(const struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
return iter->flags & BTREE_ITER_ERROR ? -EIO : 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Iterate over iters within a transaction: */
|
|
|
|
|
|
|
|
static inline struct btree_iter *
|
2019-03-28 03:14:38 +00:00
|
|
|
__trans_next_iter(struct btree_trans *trans, unsigned idx)
|
2019-03-28 02:03:30 +00:00
|
|
|
{
|
2020-12-09 18:34:42 +00:00
|
|
|
u64 l;
|
|
|
|
|
|
|
|
if (idx == BTREE_ITER_MAX)
|
|
|
|
return NULL;
|
|
|
|
|
|
|
|
l = trans->iters_linked >> idx;
|
2020-12-02 04:11:53 +00:00
|
|
|
if (!l)
|
|
|
|
return NULL;
|
2019-03-28 02:03:30 +00:00
|
|
|
|
2020-12-02 04:11:53 +00:00
|
|
|
idx += __ffs64(l);
|
2020-12-09 18:34:42 +00:00
|
|
|
EBUG_ON(idx >= BTREE_ITER_MAX);
|
2020-12-02 04:11:53 +00:00
|
|
|
EBUG_ON(trans->iters[idx].idx != idx);
|
|
|
|
return &trans->iters[idx];
|
2019-03-28 02:03:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define trans_for_each_iter(_trans, _iter) \
|
2019-03-28 03:14:38 +00:00
|
|
|
for (_iter = __trans_next_iter((_trans), 0); \
|
|
|
|
(_iter); \
|
|
|
|
_iter = __trans_next_iter((_trans), (_iter)->idx + 1))
|
2019-03-28 02:03:30 +00:00
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
static inline bool __iter_has_node(const struct btree_iter *iter,
|
|
|
|
const struct btree *b)
|
|
|
|
{
|
2020-06-06 16:28:01 +00:00
|
|
|
return iter->l[b->c.level].b == b &&
|
|
|
|
btree_node_lock_seq_matches(iter, b, b->c.level);
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct btree_iter *
|
2019-03-28 02:03:30 +00:00
|
|
|
__trans_next_iter_with_node(struct btree_trans *trans, struct btree *b,
|
2019-03-28 03:14:38 +00:00
|
|
|
unsigned idx)
|
2017-03-17 06:18:50 +00:00
|
|
|
{
|
2019-05-14 18:08:23 +00:00
|
|
|
struct btree_iter *iter = __trans_next_iter(trans, idx);
|
2019-03-28 02:03:30 +00:00
|
|
|
|
2019-05-14 18:08:23 +00:00
|
|
|
while (iter && !__iter_has_node(iter, b))
|
|
|
|
iter = __trans_next_iter(trans, iter->idx + 1);
|
2019-03-28 02:03:30 +00:00
|
|
|
|
2019-05-14 18:08:23 +00:00
|
|
|
return iter;
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
2019-03-28 02:03:30 +00:00
|
|
|
#define trans_for_each_iter_with_node(_trans, _b, _iter) \
|
2019-03-28 03:14:38 +00:00
|
|
|
for (_iter = __trans_next_iter_with_node((_trans), (_b), 0); \
|
|
|
|
(_iter); \
|
|
|
|
_iter = __trans_next_iter_with_node((_trans), (_b), \
|
|
|
|
(_iter)->idx + 1))
|
2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_BCACHEFS_DEBUG
|
2020-02-18 21:17:55 +00:00
|
|
|
void bch2_btree_trans_verify_iters(struct btree_trans *, struct btree *);
|
2019-03-28 02:03:30 +00:00
|
|
|
void bch2_btree_trans_verify_locks(struct btree_trans *);
|
2017-03-17 06:18:50 +00:00
|
|
|
#else
|
2020-02-18 21:17:55 +00:00
|
|
|
static inline void bch2_btree_trans_verify_iters(struct btree_trans *trans,
|
|
|
|
struct btree *b) {}
|
2019-03-28 02:03:30 +00:00
|
|
|
static inline void bch2_btree_trans_verify_locks(struct btree_trans *iter) {}
|
2017-03-17 06:18:50 +00:00
|
|
|
#endif
|
|
|
|
|
2019-10-02 13:56:39 +00:00
|
|
|
void bch2_btree_iter_fix_key_modified(struct btree_iter *, struct btree *,
|
|
|
|
struct bkey_packed *);
|
2017-03-17 06:18:50 +00:00
|
|
|
void bch2_btree_node_iter_fix(struct btree_iter *, struct btree *,
|
2018-08-11 23:12:05 +00:00
|
|
|
struct btree_node_iter *, struct bkey_packed *,
|
|
|
|
unsigned, unsigned);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2021-07-24 21:12:51 +00:00
|
|
|
bool bch2_btree_iter_relock_intent(struct btree_iter *);
|
2021-07-14 19:13:27 +00:00
|
|
|
bool bch2_btree_iter_relock(struct btree_iter *, unsigned long);
|
|
|
|
|
2019-05-15 13:47:40 +00:00
|
|
|
bool bch2_trans_relock(struct btree_trans *);
|
|
|
|
void bch2_trans_unlock(struct btree_trans *);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2021-07-25 21:19:52 +00:00
|
|
|
__always_inline
|
|
|
|
static inline int btree_trans_restart(struct btree_trans *trans)
|
|
|
|
{
|
|
|
|
trans->restarted = true;
|
|
|
|
bch2_trans_unlock(trans);
|
|
|
|
return -EINTR;
|
|
|
|
}
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
bool __bch2_btree_iter_upgrade(struct btree_iter *, unsigned);
|
|
|
|
|
|
|
|
static inline bool bch2_btree_iter_upgrade(struct btree_iter *iter,
|
2019-05-10 21:09:42 +00:00
|
|
|
unsigned new_locks_want)
|
2017-03-17 06:18:50 +00:00
|
|
|
{
|
|
|
|
new_locks_want = min(new_locks_want, BTREE_MAX_DEPTH);
|
|
|
|
|
|
|
|
return iter->locks_want < new_locks_want
|
2021-03-31 20:43:50 +00:00
|
|
|
? __bch2_btree_iter_upgrade(iter, new_locks_want)
|
2017-03-17 06:18:50 +00:00
|
|
|
: iter->uptodate <= BTREE_ITER_NEED_PEEK;
|
|
|
|
}
|
|
|
|
|
|
|
|
void __bch2_btree_iter_downgrade(struct btree_iter *, unsigned);
|
|
|
|
|
|
|
|
static inline void bch2_btree_iter_downgrade(struct btree_iter *iter)
|
|
|
|
{
|
2021-07-10 17:44:42 +00:00
|
|
|
unsigned new_locks_want = iter->level + !!(iter->flags & BTREE_ITER_INTENT);
|
2021-04-03 01:29:05 +00:00
|
|
|
|
|
|
|
if (iter->locks_want > new_locks_want)
|
|
|
|
__bch2_btree_iter_downgrade(iter, new_locks_want);
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
2020-06-08 17:26:48 +00:00
|
|
|
void bch2_trans_downgrade(struct btree_trans *);
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
void bch2_btree_iter_node_replace(struct btree_iter *, struct btree *);
|
|
|
|
void bch2_btree_iter_node_drop(struct btree_iter *, struct btree *);
|
|
|
|
|
|
|
|
void bch2_btree_iter_reinit_node(struct btree_iter *, struct btree *);
|
|
|
|
|
2021-03-24 01:22:50 +00:00
|
|
|
int __must_check bch2_btree_iter_traverse(struct btree_iter *);
|
2019-09-08 18:00:12 +00:00
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
struct btree *bch2_btree_iter_peek_node(struct btree_iter *);
|
2020-02-18 21:17:55 +00:00
|
|
|
struct btree *bch2_btree_iter_next_node(struct btree_iter *);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
struct bkey_s_c bch2_btree_iter_peek(struct btree_iter *);
|
|
|
|
struct bkey_s_c bch2_btree_iter_next(struct btree_iter *);
|
2019-09-07 21:17:21 +00:00
|
|
|
|
|
|
|
struct bkey_s_c bch2_btree_iter_peek_prev(struct btree_iter *);
|
2017-03-17 06:18:50 +00:00
|
|
|
struct bkey_s_c bch2_btree_iter_prev(struct btree_iter *);
|
|
|
|
|
|
|
|
struct bkey_s_c bch2_btree_iter_peek_slot(struct btree_iter *);
|
|
|
|
struct bkey_s_c bch2_btree_iter_next_slot(struct btree_iter *);
|
2021-03-03 03:45:28 +00:00
|
|
|
struct bkey_s_c bch2_btree_iter_prev_slot(struct btree_iter *);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2021-03-21 20:55:25 +00:00
|
|
|
bool bch2_btree_iter_advance(struct btree_iter *);
|
|
|
|
bool bch2_btree_iter_rewind(struct btree_iter *);
|
2021-03-22 01:16:52 +00:00
|
|
|
|
|
|
|
static inline void bch2_btree_iter_set_pos(struct btree_iter *iter, struct bpos new_pos)
|
|
|
|
{
|
bcachefs: Start using bpos.snapshot field
This patch starts treating the bpos.snapshot field like part of the key
in the btree code:
* bpos_successor() and bpos_predecessor() now include the snapshot field
* Keys in btrees that will be using snapshots (extents, inodes, dirents
and xattrs) now always have their snapshot field set to U32_MAX
The btree iterator code gets a new flag, BTREE_ITER_ALL_SNAPSHOTS, that
determines whether we're iterating over keys in all snapshots or not -
internally, this controlls whether bkey_(successor|predecessor)
increment/decrement the snapshot field, or only the higher bits of the
key.
We add a new member to struct btree_iter, iter->snapshot: when
BTREE_ITER_ALL_SNAPSHOTS is not set, iter->pos.snapshot should always
equal iter->snapshot, which will be 0 for btrees that don't use
snapshots, and alsways U32_MAX for btrees that will use snapshots
(until we enable snapshot creation).
This patch also introduces a new metadata version number, and compat
code for reading from/writing to older versions - this isn't a forced
upgrade (yet).
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2021-03-24 22:02:16 +00:00
|
|
|
if (!(iter->flags & BTREE_ITER_ALL_SNAPSHOTS))
|
|
|
|
new_pos.snapshot = iter->snapshot;
|
|
|
|
|
2021-04-04 01:09:13 +00:00
|
|
|
iter->k.type = KEY_TYPE_deleted;
|
|
|
|
iter->k.p.inode = iter->pos.inode = new_pos.inode;
|
|
|
|
iter->k.p.offset = iter->pos.offset = new_pos.offset;
|
|
|
|
iter->k.p.snapshot = iter->pos.snapshot = new_pos.snapshot;
|
|
|
|
iter->k.size = 0;
|
2021-06-04 21:17:45 +00:00
|
|
|
iter->should_be_locked = false;
|
2021-03-22 01:16:52 +00:00
|
|
|
}
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2021-06-14 22:16:10 +00:00
|
|
|
static inline void bch2_btree_iter_set_pos_to_extent_start(struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
BUG_ON(!(iter->flags & BTREE_ITER_IS_EXTENTS));
|
|
|
|
iter->pos = bkey_start_pos(&iter->k);
|
|
|
|
}
|
|
|
|
|
2021-03-20 19:12:05 +00:00
|
|
|
static inline struct btree_iter *btree_iter_child(struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
return iter->child_idx == U8_MAX ? NULL
|
|
|
|
: iter->trans->iters + iter->child_idx;
|
|
|
|
}
|
|
|
|
|
2020-10-26 18:45:20 +00:00
|
|
|
/* Sort order for locking btree iterators: */
|
|
|
|
static inline int btree_iter_lock_cmp(const struct btree_iter *l,
|
|
|
|
const struct btree_iter *r)
|
2017-03-17 06:18:50 +00:00
|
|
|
{
|
2019-03-08 00:46:10 +00:00
|
|
|
return cmp_int(l->btree_id, r->btree_id) ?:
|
2020-11-06 01:49:08 +00:00
|
|
|
-cmp_int(btree_iter_is_cached(l), btree_iter_is_cached(r)) ?:
|
2021-04-14 17:26:15 +00:00
|
|
|
bkey_cmp(l->real_pos, r->real_pos);
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Unlocks before scheduling
|
|
|
|
* Note: does not revalidate iterator
|
|
|
|
*/
|
2019-05-15 13:53:27 +00:00
|
|
|
static inline int bch2_trans_cond_resched(struct btree_trans *trans)
|
2017-03-17 06:18:50 +00:00
|
|
|
{
|
2019-05-15 13:53:27 +00:00
|
|
|
if (need_resched() || race_fault()) {
|
2019-03-25 21:06:42 +00:00
|
|
|
bch2_trans_unlock(trans);
|
2017-03-17 06:18:50 +00:00
|
|
|
schedule();
|
2019-05-15 13:53:27 +00:00
|
|
|
return bch2_trans_relock(trans) ? 0 : -EINTR;
|
|
|
|
} else {
|
|
|
|
return 0;
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-03-25 19:10:15 +00:00
|
|
|
#define __for_each_btree_node(_trans, _iter, _btree_id, _start, \
|
2017-03-17 06:18:50 +00:00
|
|
|
_locks_want, _depth, _flags, _b) \
|
2019-03-25 19:10:15 +00:00
|
|
|
for (iter = bch2_trans_get_node_iter((_trans), (_btree_id), \
|
|
|
|
_start, _locks_want, _depth, _flags), \
|
2017-03-17 06:18:50 +00:00
|
|
|
_b = bch2_btree_iter_peek_node(_iter); \
|
|
|
|
(_b); \
|
2020-02-18 21:17:55 +00:00
|
|
|
(_b) = bch2_btree_iter_next_node(_iter))
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2019-03-25 19:10:15 +00:00
|
|
|
#define for_each_btree_node(_trans, _iter, _btree_id, _start, \
|
|
|
|
_flags, _b) \
|
|
|
|
__for_each_btree_node(_trans, _iter, _btree_id, _start, \
|
|
|
|
0, 0, _flags, _b)
|
2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
static inline struct bkey_s_c __bch2_btree_iter_peek(struct btree_iter *iter,
|
|
|
|
unsigned flags)
|
|
|
|
{
|
2021-06-11 00:15:50 +00:00
|
|
|
return flags & BTREE_ITER_SLOTS
|
|
|
|
? bch2_btree_iter_peek_slot(iter)
|
|
|
|
: bch2_btree_iter_peek(iter);
|
2017-03-17 06:18:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline struct bkey_s_c __bch2_btree_iter_next(struct btree_iter *iter,
|
|
|
|
unsigned flags)
|
|
|
|
{
|
|
|
|
return flags & BTREE_ITER_SLOTS
|
|
|
|
? bch2_btree_iter_next_slot(iter)
|
|
|
|
: bch2_btree_iter_next(iter);
|
|
|
|
}
|
|
|
|
|
2019-09-25 19:57:56 +00:00
|
|
|
static inline int bkey_err(struct bkey_s_c k)
|
|
|
|
{
|
|
|
|
return PTR_ERR_OR_ZERO(k.k);
|
|
|
|
}
|
|
|
|
|
2019-04-17 19:49:28 +00:00
|
|
|
#define for_each_btree_key(_trans, _iter, _btree_id, \
|
|
|
|
_start, _flags, _k, _ret) \
|
2020-12-02 04:11:53 +00:00
|
|
|
for ((_iter) = bch2_trans_get_iter((_trans), (_btree_id), \
|
|
|
|
(_start), (_flags)), \
|
2021-03-05 03:11:28 +00:00
|
|
|
(_k) = __bch2_btree_iter_peek(_iter, _flags); \
|
|
|
|
!((_ret) = bkey_err(_k)) && (_k).k; \
|
|
|
|
(_k) = __bch2_btree_iter_next(_iter, _flags))
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2019-09-25 19:57:56 +00:00
|
|
|
#define for_each_btree_key_continue(_iter, _flags, _k, _ret) \
|
2017-03-17 06:18:50 +00:00
|
|
|
for ((_k) = __bch2_btree_iter_peek(_iter, _flags); \
|
2019-09-25 19:57:56 +00:00
|
|
|
!((_ret) = bkey_err(_k)) && (_k).k; \
|
2017-03-17 06:18:50 +00:00
|
|
|
(_k) = __bch2_btree_iter_next(_iter, _flags))
|
|
|
|
|
|
|
|
/* new multiple iterator interface: */
|
|
|
|
|
2019-03-25 19:10:15 +00:00
|
|
|
int bch2_trans_iter_put(struct btree_trans *, struct btree_iter *);
|
|
|
|
int bch2_trans_iter_free(struct btree_trans *, struct btree_iter *);
|
2019-03-25 19:34:48 +00:00
|
|
|
|
2019-09-27 02:21:39 +00:00
|
|
|
void bch2_trans_unlink_iters(struct btree_trans *);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2020-04-01 21:14:14 +00:00
|
|
|
struct btree_iter *__bch2_trans_get_iter(struct btree_trans *, enum btree_id,
|
2021-04-03 01:29:05 +00:00
|
|
|
struct bpos, unsigned,
|
|
|
|
unsigned, unsigned);
|
2020-04-01 21:14:14 +00:00
|
|
|
|
|
|
|
static inline struct btree_iter *
|
|
|
|
bch2_trans_get_iter(struct btree_trans *trans, enum btree_id btree_id,
|
|
|
|
struct bpos pos, unsigned flags)
|
|
|
|
{
|
|
|
|
struct btree_iter *iter =
|
2021-04-03 01:29:05 +00:00
|
|
|
__bch2_trans_get_iter(trans, btree_id, pos,
|
|
|
|
(flags & BTREE_ITER_INTENT) != 0, 0,
|
|
|
|
flags);
|
2020-12-02 04:11:53 +00:00
|
|
|
iter->ip_allocated = _THIS_IP_;
|
2020-04-01 21:14:14 +00:00
|
|
|
return iter;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct btree_iter *__bch2_trans_copy_iter(struct btree_trans *,
|
2019-03-26 02:43:26 +00:00
|
|
|
struct btree_iter *);
|
2020-04-01 21:14:14 +00:00
|
|
|
static inline struct btree_iter *
|
|
|
|
bch2_trans_copy_iter(struct btree_trans *trans, struct btree_iter *src)
|
|
|
|
{
|
|
|
|
struct btree_iter *iter =
|
|
|
|
__bch2_trans_copy_iter(trans, src);
|
|
|
|
|
2020-12-02 04:11:53 +00:00
|
|
|
iter->ip_allocated = _THIS_IP_;
|
2020-04-01 21:14:14 +00:00
|
|
|
return iter;
|
|
|
|
}
|
|
|
|
|
2019-09-27 02:21:39 +00:00
|
|
|
struct btree_iter *bch2_trans_get_node_iter(struct btree_trans *,
|
|
|
|
enum btree_id, struct bpos,
|
|
|
|
unsigned, unsigned, unsigned);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
2021-02-21 03:19:34 +00:00
|
|
|
static inline bool btree_iter_live(struct btree_trans *trans, struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
return (trans->iters_live & (1ULL << iter->idx)) != 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline bool btree_iter_keep(struct btree_trans *trans, struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
return btree_iter_live(trans, iter) ||
|
|
|
|
(iter->flags & BTREE_ITER_KEEP_UNTIL_COMMIT);
|
|
|
|
}
|
|
|
|
|
2021-03-20 02:54:18 +00:00
|
|
|
static inline void set_btree_iter_dontneed(struct btree_trans *trans, struct btree_iter *iter)
|
|
|
|
{
|
|
|
|
trans->iters_touched &= ~(1ULL << iter->idx);
|
|
|
|
}
|
|
|
|
|
2021-07-25 03:57:28 +00:00
|
|
|
void bch2_trans_begin(struct btree_trans *);
|
2017-03-17 06:18:50 +00:00
|
|
|
|
|
|
|
void *bch2_trans_kmalloc(struct btree_trans *, size_t);
|
2019-05-15 14:54:43 +00:00
|
|
|
void bch2_trans_init(struct btree_trans *, struct bch_fs *, unsigned, size_t);
|
2017-03-17 06:18:50 +00:00
|
|
|
int bch2_trans_exit(struct btree_trans *);
|
|
|
|
|
2020-06-02 20:36:11 +00:00
|
|
|
void bch2_btree_trans_to_text(struct printbuf *, struct bch_fs *);
|
|
|
|
|
2019-09-07 18:16:00 +00:00
|
|
|
void bch2_fs_btree_iter_exit(struct bch_fs *);
|
|
|
|
int bch2_fs_btree_iter_init(struct bch_fs *);
|
|
|
|
|
2017-03-17 06:18:50 +00:00
|
|
|
#endif /* _BCACHEFS_BTREE_ITER_H */
|