Commit d70b4f53 authored by Jaegeuk Kim's avatar Jaegeuk Kim

f2fs: add a tracepoint on f2fs_new_inode

This can help when debugging the free nid allocation flows.
Reviewed-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 9198aceb
...@@ -63,7 +63,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) ...@@ -63,7 +63,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
nid_free = true; nid_free = true;
goto out; goto out;
} }
trace_f2fs_new_inode(inode, 0);
mark_inode_dirty(inode); mark_inode_dirty(inode);
return inode; return inode;
...@@ -71,6 +71,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode) ...@@ -71,6 +71,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
clear_nlink(inode); clear_nlink(inode);
unlock_new_inode(inode); unlock_new_inode(inode);
fail: fail:
trace_f2fs_new_inode(inode, err);
iput(inode); iput(inode);
if (nid_free) if (nid_free)
alloc_nid_failed(sbi, ino); alloc_nid_failed(sbi, ino);
......
...@@ -197,6 +197,13 @@ DEFINE_EVENT(f2fs__inode, f2fs_evict_inode, ...@@ -197,6 +197,13 @@ DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
TP_ARGS(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, TRACE_EVENT(f2fs_unlink_enter,
TP_PROTO(struct inode *dir, struct dentry *dentry), TP_PROTO(struct inode *dir, struct dentry *dentry),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment