f2fs: add tracepoints to debug the block allocation & fallocate
Subsystems (3)
PATCH v4 5/7 f2fs: add tracepoints to debug the block allocation & fallocate
From: Namjae Jeon <[email protected]>
Add tracepoints to debug the block allocation & fallocate.
Signed-off-by Namjae Jeon <[email protected]>
Signed-off-by Pankaj Kumar <[email protected]>
Acked-by Steven Rostedt <[email protected]>
--- fs/f2fs/data.c | 1 + fs/f2fs/file.c | 6 ++++- include/trace/events/f2fs.h | 59 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-)
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, dn->ofs_in_node);__set_data_blkaddr (dn,NEW_ADDR ); dn->data_blkaddr =NEW_ADDR ;sync_inode_page (dn);
fs/f2fs/file.c +5 -1
@@ -532,8 +532,10 @@ static long f2fs_fallocate(struct file *file, int mode,struct inode *inode =file_inode (file);long ret; -if (mode & ~(FALLOC_FL_KEEP_SIZE |FALLOC_FL_PUNCH_HOLE )) +if (mode & ~(FALLOC_FL_KEEP_SIZE |FALLOC_FL_PUNCH_HOLE )) { +trace_f2fs_fallocate (inode, offset, len, mode, -EOPNOTSUPP );return -EOPNOTSUPP ; + }if (mode &FALLOC_FL_PUNCH_HOLE ) ret =punch_hole (inode, offset, len, mode);
@@ -544,6 +546,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 (inode, offset, len, mode, ret);return ret; }
include/trace/events/f2fs.h +59 -0
65 lines not on this page · raw message
Signature · 1 line
1.7.9.5
From c01e285324793a86c2c90c8451ed6feb04b3d310 Mon Sep 17 00:00:00 2001
From: Namjae Jeon <[email protected]>
Date: Tue, 23 Apr 2013 17:00:52 +0900
Subject: [PATCH 5/7] f2fs: add tracepoints to debug the block allocation
Cc: [email protected], [email protected], [email protected]
Add tracepoints to debug the block allocation & fallocate.
Signed-off-by Namjae Jeon <[email protected]>
Signed-off-by Pankaj Kumar <[email protected]>
Acked-by Steven Rostedt <[email protected]>
[Jaegeuk: enhance information]
Signed-off-by Jaegeuk Kim <[email protected]>
--- fs/f2fs/data.c | 2 ++ fs/f2fs/file.c | 1 + include/trace/events/f2fs.h | 64 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+)
fs/f2fs/data.c +2 -0
@@ -55,6 +55,8 @@ 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, dn->ofs_in_node); +__set_data_blkaddr (dn,NEW_ADDR ); dn->data_blkaddr =NEW_ADDR ;sync_inode_page (dn);
fs/f2fs/file.c +0 -0
@@ -546,6 +546,7 @@ static long f2fs_fallocate(struct file *file, int
mode,
inode->i_mtime = inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode);
}
+ trace_f2fs_fallocate(inode, mode, offset, len, ret);
return ret;
}
include/trace/events/f2fs.h +64 -0
70 lines not on this page · raw message
Signature · 7 lines
1.8.1.3.566.gaa39828 -- Jaegeuk Kim Samsung