summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/btree_update_interior.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-01-09 01:11:18 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:49 -0400
commitee2c6ea7760eceee3051ef2f2046d16dc5ab06ec (patch)
treee442537fa030ead75a5bfdf689fc8929eb09bc22 /fs/bcachefs/btree_update_interior.c
parent6c36318cc702f05d302fb98a99636e320392bdf1 (diff)
downloadlinux-stable-ee2c6ea7760eceee3051ef2f2046d16dc5ab06ec.tar.gz
linux-stable-ee2c6ea7760eceee3051ef2f2046d16dc5ab06ec.tar.bz2
linux-stable-ee2c6ea7760eceee3051ef2f2046d16dc5ab06ec.zip
bcachefs: btree_iter->ip_allocated
In debug mode, we now track where btree iterators and paths are initialized/allocated - helpful in tracking down btree path overflows. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_update_interior.c')
-rw-r--r--fs/bcachefs/btree_update_interior.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c
index e184b857c4c4..cb1e7dbf5440 100644
--- a/fs/bcachefs/btree_update_interior.c
+++ b/fs/bcachefs/btree_update_interior.c
@@ -36,8 +36,9 @@ static struct btree_path *get_unlocked_mut_path(struct btree_trans *trans,
struct btree_path *path;
path = bch2_path_get(trans, btree_id, pos, level + 1, level,
- BTREE_ITER_NOPRESERVE|BTREE_ITER_INTENT);
- path = bch2_btree_path_make_mut(trans, path, true);
+ BTREE_ITER_NOPRESERVE|
+ BTREE_ITER_INTENT, _RET_IP_);
+ path = bch2_btree_path_make_mut(trans, path, true, _RET_IP_);
bch2_btree_path_downgrade(trans, path);
__bch2_btree_path_unlock(trans, path);
return path;
@@ -1780,7 +1781,7 @@ int __bch2_foreground_maybe_merge(struct btree_trans *trans,
: bpos_successor(b->data->max_key);
sib_path = bch2_path_get(trans, path->btree_id, sib_pos,
- U8_MAX, level, BTREE_ITER_INTENT);
+ U8_MAX, level, BTREE_ITER_INTENT, _THIS_IP_);
ret = bch2_btree_path_traverse(trans, sib_path, false);
if (ret)
goto err;
@@ -2093,7 +2094,8 @@ static int __bch2_btree_node_update_key(struct btree_trans *trans,
bch2_trans_copy_iter(&iter2, iter);
iter2.path = bch2_btree_path_make_mut(trans, iter2.path,
- iter2.flags & BTREE_ITER_INTENT);
+ iter2.flags & BTREE_ITER_INTENT,
+ _THIS_IP_);
BUG_ON(iter2.path->level != b->c.level);
BUG_ON(!bpos_eq(iter2.path->pos, new_key->k.p));