summaryrefslogtreecommitdiff
path: root/fs/bcachefs/trace.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-06-20 22:26:41 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:34 -0400
commit38585367442f09606d7a529be3290f2fd4cbcf84 (patch)
tree4550e27d98ac3080f390720ed11723f66b7fd552 /fs/bcachefs/trace.h
parent962ad1a76669443126c6531352380f56d6e5d7d2 (diff)
bcachefs: Bucket invalidate path improvements
- invalidate_one_bucket() now returns 1 when we don't have any buckets on this device to invalidate, ensuring we don't spin - the tracepoint invocation is moved to after the transaction commit, and we now include the number of cached sectors in the tracepoint Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs/bcachefs/trace.h')
-rw-r--r--fs/bcachefs/trace.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/fs/bcachefs/trace.h b/fs/bcachefs/trace.h
index f5aa10762611..b0ecf18fa139 100644
--- a/fs/bcachefs/trace.h
+++ b/fs/bcachefs/trace.h
@@ -542,24 +542,27 @@ TRACE_EVENT(discard_buckets,
);
TRACE_EVENT(invalidate_bucket,
- TP_PROTO(struct bch_fs *c, unsigned dev, u64 bucket),
- TP_ARGS(c, dev, bucket),
+ TP_PROTO(struct bch_fs *c, unsigned dev, u64 bucket, u32 sectors),
+ TP_ARGS(c, dev, bucket, sectors),
TP_STRUCT__entry(
__field(dev_t, dev )
__field(u32, dev_idx )
+ __field(u32, sectors )
__field(u64, bucket )
),
TP_fast_assign(
__entry->dev = c->dev;
__entry->dev_idx = dev;
+ __entry->sectors = sectors;
__entry->bucket = bucket;
),
- TP_printk("%d:%d invalidated %u:%llu",
+ TP_printk("%d:%d invalidated %u:%llu cached sectors %u",
MAJOR(__entry->dev), MINOR(__entry->dev),
- __entry->dev_idx, __entry->bucket)
+ __entry->dev_idx, __entry->bucket,
+ __entry->sectors)
);
/* Moving IO */