f2fs: introduce tracepoint for f2fs_rename()
Subsystems (2)
Chao Yu
maintainerPATCH 1/2 f2fs: introduce tracepoint for f2fs_rename()
This patch adds tracepoints for f2fs_rename().
Signed-off-by Chao Yu <[email protected]>
--- fs/f2fs/namei.c | 16 ++++++--- include/trace/events/f2fs.h | 69 +++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 5 deletions(-)
fs/f2fs/namei.c +11 -5
@@ -1315,21 +1315,27 @@ static int f2fs_rename2(struct mnt_idmap *idmap,if (flags & ~(RENAME_NOREPLACE |RENAME_EXCHANGE |RENAME_WHITEOUT ))return -EINVAL ; +trace_f2fs_rename_start (old_dir, old_dentry, new_dir, new_dentry, + flags); + err =fscrypt_prepare_rename (old_dir, old_dentry, new_dir, new_dentry, flags);if (err)return err; -if (flags &RENAME_EXCHANGE ) { -return f2fs_cross_rename (old_dir, old_dentry, - new_dir, new_dentry); - } +if (flags &RENAME_EXCHANGE ) + err =f2fs_cross_rename (old_dir, old_dentry, + new_dir, new_dentry); +else /* * VFS has already handled the new dentry existence case, * here, we just deal with "RENAME_NOREPLACE" as regular rename. */ -return f2fs_rename (idmap, old_dir, old_dentry, + err =f2fs_rename (idmap, old_dir, old_dentry, new_dir, new_dentry, flags); + +trace_f2fs_rename_end (old_dentry, new_dentry, flags, err); +return err; } static const char *f2fs_encrypted_get_link(struct dentry *dentry,
include/trace/events/f2fs.h +69 -0
75 lines not on this page · raw message
Signature · 1 line
2.40.1
Chao Yu
maintainerPATCH 2/2 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 <[email protected]>
--- include/trace/events/f2fs.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-)
include/trace/events/f2fs.h +18 -1
@@ -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) );
Signature · 1 line
2.40.1
This series was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:
Hello:
This series was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:
Quoted 7 lines · On Tue, 28 Nov 2023 17:31:29 +0800 you wrote:
This patch adds tracepoints for
f2fs_rename().Signed-off-by Chao Yu <[email protected]>--- fs/f2fs/namei.c | 16 ++++++--- include/trace/events/f2fs.h | 69 +++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 5 deletions(-)
Here is the summary with links:
- [f2fs-dev,1/2] f2fs: introduce tracepoint for f2fs_rename()
https://git.kernel.org/jaegeuk/f2fs/c/5f23ffdf17e8 - [f2fs-dev,2/2] f2fs: show i_mode in trace_f2fs_new_inode() https://git.kernel.org/jaegeuk/f2fs/c/8e9cf55ef89c
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html