diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-09-12 03:44:33 +0300 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-23 00:10:12 +0300 |
commit | feb5cc398120ce09fd7c72d361b3d14d9e280b96 (patch) | |
tree | a4ed6e786d6132f1b3771ed883f3f6afc97bf35e /fs/bcachefs/trace.h | |
parent | f3e374efbf1e32fc0235d44abc68abae06a8f7ab (diff) | |
download | linux-feb5cc398120ce09fd7c72d361b3d14d9e280b96.tar.xz |
bcachefs: trace_read_nopromote()
Add a tracepoint to print the reason a read wasn't promoted.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r-- | fs/bcachefs/trace.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h index 97fe774237d0..19264492151b 100644 --- a/fs/bcachefs/trace.h +++ b/fs/bcachefs/trace.h @@ -137,6 +137,25 @@ DEFINE_EVENT(bio, read_promote, TP_ARGS(bio) ); +TRACE_EVENT(read_nopromote, + TP_PROTO(struct bch_fs *c, int ret), + TP_ARGS(c, ret), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __array(char, ret, 32 ) + ), + + TP_fast_assign( + __entry->dev = c->dev; + strscpy(__entry->ret, bch2_err_str(ret), sizeof(__entry->ret)); + ), + + TP_printk("%d,%d ret %s", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->ret) +); + DEFINE_EVENT(bio, read_bounce, TP_PROTO(struct bio *bio), TP_ARGS(bio) |