diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-10 19:42:55 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:09:38 +0300 |
commit | 9f96568c0ab983fbb0f6eefa36ad799a72bc9358 (patch) | |
tree | 5ac34f107f137fb676efa7eda263c75442ead9c0 /fs/bcachefs/btree_locking.h | |
parent | c7be3cb546e3bb2704008506bd6c50ad5ea02441 (diff) | |
download | linux-9f96568c0ab983fbb0f6eefa36ad799a72bc9358.tar.xz |
bcachefs: Tracepoint improvements
Our types are exported to the tracepoint code, so it's not necessary to
break things out individually when passing them to tracepoints - we can
also call other functions from TP_fast_assign().
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/btree_locking.h')
-rw-r--r-- | fs/bcachefs/btree_locking.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/bcachefs/btree_locking.h b/fs/bcachefs/btree_locking.h index 7dcfe3009b84..5e2cd170aea2 100644 --- a/fs/bcachefs/btree_locking.h +++ b/fs/bcachefs/btree_locking.h @@ -13,6 +13,11 @@ #include "btree_iter.h" #include "six.h" +static inline bool is_btree_node(struct btree_path *path, unsigned l) +{ + return l < BTREE_MAX_DEPTH && !IS_ERR_OR_NULL(path->l[l].b); +} + /* matches six lock types */ enum btree_node_locked_type { BTREE_NODE_UNLOCKED = -1, @@ -306,4 +311,7 @@ static inline void btree_path_set_level_up(struct btree_trans *trans, btree_path_set_dirty(path, BTREE_ITER_NEED_TRAVERSE); } +struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *, + struct btree_path *, struct btree *, unsigned); + #endif /* _BCACHEFS_BTREE_LOCKING_H */ |