f2fs: add tracepoints to debug the block allocation and fallocate
Subsystems (3)
PATCH v2 5/7 f2fs: add tracepoints to debug the block allocation and fallocate
From: Namjae Jeon <[email protected]>
Add tracepoints to debug the block allocation and fallocate.
Signed-off-by Namjae Jeon <[email protected]>
Signed-off-by Pankaj Kumar <[email protected]>
--- fs/f2fs/data.c | 1 + fs/f2fs/file.c | 3 ++ include/trace/events/f2fs.h | 76 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+)
fs/f2fs/data.c +1 -0
@@ -56,6 +56,7 @@ int reserve_new_block(struct dnode_of_data *dn)if (!inc_valid_block_count (sbi, dn->inode,1 ))return -ENOSPC ; +trace_f2fs_reserve_new_block (dn->inode, dn->nid);__set_data_blkaddr (dn,NEW_ADDR ); dn->data_blkaddr =NEW_ADDR ;sync_inode_page (dn);
fs/f2fs/file.c +3 -0
@@ -554,6 +554,7 @@ static long f2fs_fallocate(struct file *file, int mode,struct inode *inode =file_inode (file);long ret; +trace_f2fs_fallocate_enter (inode, offset, len, mode);if (mode & ~(FALLOC_FL_KEEP_SIZE |FALLOC_FL_PUNCH_HOLE ))return -EOPNOTSUPP ;
@@ -566,6 +567,8 @@ static long f2fs_fallocate(struct file *file, int mode, inode->i_mtime = inode->i_ctime =CURRENT_TIME ;mark_inode_dirty (inode); } + +trace_f2fs_fallocate_exit (inode, offset, len, ret);return ret; }
include/trace/events/f2fs.h +76 -0
82 lines not on this page · raw message
Signature · 1 line
1.7.9.5