summaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-06-29 20:13:12 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2020-07-07 21:51:46 -0700
commitb79b0a310bca6dbe86d8adc1ca6a88e818bc1f19 (patch)
tree8d944def4969e01fd4ebbb7ba891a184f76cff09 /include/trace
parent250e84d725479914aa6f3feec1191c5f1ea3c057 (diff)
downloadlinux-b79b0a310bca6dbe86d8adc1ca6a88e818bc1f19.tar.gz
linux-b79b0a310bca6dbe86d8adc1ca6a88e818bc1f19.tar.bz2
linux-b79b0a310bca6dbe86d8adc1ca6a88e818bc1f19.zip
f2fs: support to trace f2fs_bmap()
to show f2fs_bmap()'s result as below: f2fs_bmap: dev = (251,0), ino = 7, lblock:0, pblock:396800 Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/f2fs.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h
index 8639ab962a71..2e8713a52d76 100644
--- a/include/trace/events/f2fs.h
+++ b/include/trace/events/f2fs.h
@@ -1891,6 +1891,32 @@ TRACE_EVENT(f2fs_iostat,
__entry->fs_cdrio, __entry->fs_nrio, __entry->fs_mrio)
);
+TRACE_EVENT(f2fs_bmap,
+
+ TP_PROTO(struct inode *inode, sector_t lblock, sector_t pblock),
+
+ TP_ARGS(inode, lblock, pblock),
+
+ TP_STRUCT__entry(
+ __field(dev_t, dev)
+ __field(ino_t, ino)
+ __field(sector_t, lblock)
+ __field(sector_t, pblock)
+ ),
+
+ TP_fast_assign(
+ __entry->dev = inode->i_sb->s_dev;
+ __entry->ino = inode->i_ino;
+ __entry->lblock = lblock;
+ __entry->pblock = pblock;
+ ),
+
+ TP_printk("dev = (%d,%d), ino = %lu, lblock:%lld, pblock:%lld",
+ show_dev_ino(__entry),
+ (unsigned long long)__entry->lblock,
+ (unsigned long long)__entry->pblock)
+);
+
#endif /* _TRACE_F2FS_H */
/* This part must be outside protection */