diff --git a/fs/bcachefs/btree_update_interior.c b/fs/bcachefs/btree_update_interior.c index e10c159ec079..fc768195be54 100644 --- a/fs/bcachefs/btree_update_interior.c +++ b/fs/bcachefs/btree_update_interior.c @@ -1053,7 +1053,7 @@ bch2_btree_update_start(struct btree_trans *trans, struct btree_path *path, BTREE_UPDATE_JOURNAL_RES, journal_flags); if (ret) { - trace_trans_restart_journal_preres_get(trans, _RET_IP_); + trace_trans_restart_journal_preres_get(trans, _RET_IP_, journal_flags); ret = btree_trans_restart(trans, BCH_ERR_transaction_restart_journal_preres_get); goto err; } diff --git a/fs/bcachefs/btree_update_leaf.c b/fs/bcachefs/btree_update_leaf.c index 6ae4755cfd24..e3501623931a 100644 --- a/fs/bcachefs/btree_update_leaf.c +++ b/fs/bcachefs/btree_update_leaf.c @@ -285,7 +285,7 @@ bch2_trans_journal_preres_get_cold(struct btree_trans *trans, unsigned u64s, ret = bch2_trans_relock(trans); if (ret) { - trace_trans_restart_journal_preres_get(trans, trace_ip); + trace_trans_restart_journal_preres_get(trans, trace_ip, 0); return ret; } diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 472175e8c2e3..2c1661ab807b 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -781,10 +781,28 @@ DEFINE_EVENT(transaction_event, trans_restart_journal_res_get, TP_ARGS(trans, caller_ip) ); -DEFINE_EVENT(transaction_event, trans_restart_journal_preres_get, + +TRACE_EVENT(trans_restart_journal_preres_get, TP_PROTO(struct btree_trans *trans, - unsigned long caller_ip), - TP_ARGS(trans, caller_ip) + unsigned long caller_ip, + unsigned flags), + TP_ARGS(trans, caller_ip, flags), + + TP_STRUCT__entry( + __array(char, trans_fn, 32 ) + __field(unsigned long, caller_ip ) + __field(unsigned, flags ) + ), + + TP_fast_assign( + strlcpy(__entry->trans_fn, trans->fn, sizeof(__entry->trans_fn)); + __entry->caller_ip = caller_ip; + __entry->flags = flags; + ), + + TP_printk("%s %pS %x", __entry->trans_fn, + (void *) __entry->caller_ip, + __entry->flags) ); DEFINE_EVENT(transaction_event, trans_restart_journal_reclaim,