diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-08-10 18:42:55 +0200 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 23:09:38 +0200 |
commit | 9f96568c0ab983fbb0f6eefa36ad799a72bc9358 (patch) | |
tree | 5ac34f107f137fb676efa7eda263c75442ead9c0 /fs/bcachefs/btree_cache.c | |
parent | bcachefs: "Snapshot deletion did not run correctly" should be a fsck err (diff) | |
download | linux-9f96568c0ab983fbb0f6eefa36ad799a72bc9358.tar.xz linux-9f96568c0ab983fbb0f6eefa36ad799a72bc9358.zip |
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_cache.c')
-rw-r--r-- | fs/bcachefs/btree_cache.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/bcachefs/btree_cache.c b/fs/bcachefs/btree_cache.c index 4032c27fcc9c..969ecb2fdfad 100644 --- a/fs/bcachefs/btree_cache.c +++ b/fs/bcachefs/btree_cache.c @@ -691,8 +691,7 @@ static noinline struct btree *bch2_btree_node_fill(struct bch_fs *c, * been freed: */ if (trans && !bch2_btree_node_relock(trans, path, level + 1)) { - trace_trans_restart_relock_parent_for_fill(trans->fn, - _THIS_IP_, btree_id, &path->pos); + trace_trans_restart_relock_parent_for_fill(trans, _THIS_IP_, path); return ERR_PTR(btree_trans_restart(trans, BCH_ERR_transaction_restart_fill_relock)); } @@ -700,9 +699,7 @@ static noinline struct btree *bch2_btree_node_fill(struct bch_fs *c, if (trans && b == ERR_PTR(-ENOMEM)) { trans->memory_allocation_failure = true; - trace_trans_restart_memory_allocation_failure(trans->fn, - _THIS_IP_, btree_id, &path->pos); - + trace_trans_restart_memory_allocation_failure(trans, _THIS_IP_, path); return ERR_PTR(btree_trans_restart(trans, BCH_ERR_transaction_restart_fill_mem_alloc_fail)); } @@ -750,8 +747,8 @@ static noinline struct btree *bch2_btree_node_fill(struct bch_fs *c, } if (!six_relock_type(&b->c.lock, lock_type, seq)) { - trace_trans_restart_relock_after_fill(trans->fn, _THIS_IP_, - btree_id, &path->pos); + if (trans) + trace_trans_restart_relock_after_fill(trans, _THIS_IP_, path); return ERR_PTR(btree_trans_restart(trans, BCH_ERR_transaction_restart_relock_after_fill)); } @@ -906,10 +903,7 @@ lock_node: if (bch2_btree_node_relock(trans, path, level + 1)) goto retry; - trace_trans_restart_btree_node_reused(trans->fn, - trace_ip, - path->btree_id, - &path->pos); + trace_trans_restart_btree_node_reused(trans, trace_ip, path); return ERR_PTR(btree_trans_restart(trans, BCH_ERR_transaction_restart_lock_node_reused)); } } |