summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2020-06-29 14:13:12 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2020-07-08 06:51:46 +0200
commitb79b0a310bca6dbe86d8adc1ca6a88e818bc1f19 (patch)
tree8d944def4969e01fd4ebbb7ba891a184f76cff09 /include
parentf2fs: fix wrong return value of f2fs_bmap_compress() (diff)
downloadlinux-b79b0a310bca6dbe86d8adc1ca6a88e818bc1f19.tar.xz
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')
-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 */