From d70b4f53b950676228297f0b204f2e1512c1ff6c Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Thu, 25 Apr 2013 13:24:33 +0900 Subject: [PATCH] f2fs: add a tracepoint on f2fs_new_inode This can help when debugging the free nid allocation flows. Reviewed-by: Namjae Jeon Signed-off-by: Jaegeuk Kim --- fs/f2fs/namei.c | 3 ++- include/trace/events/f2fs.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index c57fd18b769d..4aa26e53c935 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -63,7 +63,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) nid_free = true; goto out; } - + trace_f2fs_new_inode(inode, 0); mark_inode_dirty(inode); return inode; @@ -71,6 +71,7 @@ out: clear_nlink(inode); unlock_new_inode(inode); fail: + trace_f2fs_new_inode(inode, err); iput(inode); if (nid_free) alloc_nid_failed(sbi, ino); diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index b2b2f72a023d..52ae54828eda 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -197,6 +197,13 @@ DEFINE_EVENT(f2fs__inode, f2fs_evict_inode, TP_ARGS(inode) ); +DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode, + + TP_PROTO(struct inode *inode, int ret), + + TP_ARGS(inode, ret) +); + TRACE_EVENT(f2fs_unlink_enter, TP_PROTO(struct inode *dir, struct dentry *dentry), -- 2.39.5