diff options
author | Chao Yu <chao@kernel.org> | 2023-11-28 10:31:30 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-11-28 19:52:51 +0100 |
commit | 8e9cf55ef89c775fdaaa7c6212dbb691420a4673 (patch) | |
tree | 320ef2e06e1686a0af7864e0bf1ad10288f36b04 /include/trace/events | |
parent | f2fs: introduce tracepoint for f2fs_rename() (diff) | |
download | linux-8e9cf55ef89c775fdaaa7c6212dbb691420a4673.tar.xz linux-8e9cf55ef89c775fdaaa7c6212dbb691420a4673.zip |
f2fs: show i_mode in trace_f2fs_new_inode()
This patch supports to show i_mode field in trace_f2fs_new_inode().
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'include/trace/events')
-rw-r--r-- | include/trace/events/f2fs.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 36d9e29ca3c5..479d26eae22f 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -161,6 +161,19 @@ TRACE_DEFINE_ENUM(EX_BLOCK_AGE); { EX_READ, "Read" }, \ { EX_BLOCK_AGE, "Block Age" }) +#define show_inode_type(x) \ + __print_symbolic(x, \ + { S_IFLNK, "symbolic" }, \ + { S_IFREG, "regular" }, \ + { S_IFDIR, "directory" }, \ + { S_IFCHR, "character" }, \ + { S_IFBLK, "block" }, \ + { S_IFIFO, "fifo" }, \ + { S_IFSOCK, "sock" }) + +#define S_ALL_PERM (S_ISUID | S_ISGID | S_ISVTX | \ + S_IRWXU | S_IRWXG | S_IRWXO) + struct f2fs_sb_info; struct f2fs_io_info; struct extent_info; @@ -215,17 +228,21 @@ DECLARE_EVENT_CLASS(f2fs__inode_exit, TP_STRUCT__entry( __field(dev_t, dev) __field(ino_t, ino) + __field(umode_t, mode) __field(int, ret) ), TP_fast_assign( __entry->dev = inode->i_sb->s_dev; __entry->ino = inode->i_ino; + __entry->mode = inode->i_mode; __entry->ret = ret; ), - TP_printk("dev = (%d,%d), ino = %lu, ret = %d", + TP_printk("dev = (%d,%d), ino = %lu, type: %s, mode = 0%o, ret = %d", show_dev_ino(__entry), + show_inode_type(__entry->mode & S_IFMT), + __entry->mode & S_ALL_PERM, __entry->ret) ); |