summaryrefslogtreecommitdiff
path: root/fs/bcachefs/trace.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-11 01:34:29 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-23 00:09:59 +0300
commitbb6c4b92fd8566aeb92e56f464ff809ae7e60155 (patch)
tree6a47fc1306784608be771382fa3e743f03ccd844 /fs/bcachefs/trace.h
parent8669199438aeb5daf8b17f76bc853286b93f058e (diff)
downloadlinux-bb6c4b92fd8566aeb92e56f464ff809ae7e60155.tar.xz
bcachefs: Improve trace_move_extent_fail()
This greatly expands the move_extent_fail tracepoint - now it includes all the information we have available, including exactly why the extent wasn't updated. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r--fs/bcachefs/trace.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h
index 65521c046254..bbe8eb7a29eb 100644
--- a/fs/bcachefs/trace.h
+++ b/fs/bcachefs/trace.h
@@ -682,9 +682,21 @@ DEFINE_EVENT(bkey, move_extent_finish,
TP_ARGS(k)
);
-DEFINE_EVENT(bkey, move_extent_fail,
- TP_PROTO(const struct bkey *k),
- TP_ARGS(k)
+TRACE_EVENT(move_extent_fail,
+ TP_PROTO(struct bch_fs *c, const char *msg),
+ TP_ARGS(c, msg),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev )
+ __string(msg, msg )
+ ),
+
+ TP_fast_assign(
+ __entry->dev = c->dev;
+ __assign_str(msg, msg);
+ ),
+
+ TP_printk("%d:%d %s", MAJOR(__entry->dev), MINOR(__entry->dev), __get_str(msg))
);
DEFINE_EVENT(bkey, move_extent_alloc_mem_fail,