diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-02-01 22:51:51 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:49 -0400 |
commit | adf6360b5d6071ea268fa6f5f03befba4909ffaa (patch) | |
tree | 5b9a65159e4494ee463b1c5ee8118991215e7f70 /fs/bcachefs/trace.h | |
parent | db36c1477d1753f4d5bebaed074ca4e4477df3ea (diff) | |
download | linux-stable-adf6360b5d6071ea268fa6f5f03befba4909ffaa.tar.gz linux-stable-adf6360b5d6071ea268fa6f5f03befba4909ffaa.tar.bz2 linux-stable-adf6360b5d6071ea268fa6f5f03befba4909ffaa.zip |
bcachefs: Improve btree_reserve_get_fail tracepoint
Now we include the return code.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 7004da8d341f..17fc58e73702 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -344,25 +344,29 @@ DEFINE_EVENT(btree_node, btree_node_free, TRACE_EVENT(btree_reserve_get_fail, TP_PROTO(const char *trans_fn, unsigned long caller_ip, - size_t required), - TP_ARGS(trans_fn, caller_ip, required), + size_t required, + int ret), + TP_ARGS(trans_fn, caller_ip, required, ret), TP_STRUCT__entry( __array(char, trans_fn, 32 ) __field(unsigned long, caller_ip ) __field(size_t, required ) + __array(char, ret, 32 ) ), TP_fast_assign( strscpy(__entry->trans_fn, trans_fn, sizeof(__entry->trans_fn)); __entry->caller_ip = caller_ip; __entry->required = required; + strscpy(__entry->ret, bch2_err_str(ret), sizeof(__entry->ret)); ), - TP_printk("%s %pS required %zu", + TP_printk("%s %pS required %zu ret %s", __entry->trans_fn, (void *) __entry->caller_ip, - __entry->required) + __entry->required, + __entry->ret) ); DEFINE_EVENT(btree_node, btree_node_compact, |