diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2013-04-19 12:28:40 -0400 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk.kim@samsung.com> | 2013-04-23 02:30:27 -0400 |
commit | a2a4a7e4abb27c833d4e09ac1d434ab48a64062c (patch) | |
tree | d23f6c9419d72e66f24c2094d79a43d6e17a6cb9 /fs/f2fs/file.c | |
parent | e66509f03e36ef4750bfab8f3a5cf632b313a39b (diff) |
f2fs: add tracepoints for sync & inode operations
Add tracepoints in f2fs for tracing the syncing
operations like filesystem sync, file sync enter/exit.
It will helf to trace the code under debugging scenarios.
Also add tracepoints for tracing the various inode operations
like building inode, eviction of inode, link/unlike of
inodes.
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
[Jaegeuk: combine and modify the tracepoint structures]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs/file.c')
-rw-r--r-- | fs/f2fs/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 07be88ddb9f8..0b0ba26ba76e 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include "segment.h" | 25 | #include "segment.h" |
26 | #include "xattr.h" | 26 | #include "xattr.h" |
27 | #include "acl.h" | 27 | #include "acl.h" |
28 | #include <trace/events/f2fs.h> | ||
28 | 29 | ||
29 | static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma, | 30 | static int f2fs_vm_page_mkwrite(struct vm_area_struct *vma, |
30 | struct vm_fault *vmf) | 31 | struct vm_fault *vmf) |
@@ -116,9 +117,12 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
116 | if (inode->i_sb->s_flags & MS_RDONLY) | 117 | if (inode->i_sb->s_flags & MS_RDONLY) |
117 | return 0; | 118 | return 0; |
118 | 119 | ||
120 | trace_f2fs_sync_file_enter(inode); | ||
119 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | 121 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); |
120 | if (ret) | 122 | if (ret) { |
123 | trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret); | ||
121 | return ret; | 124 | return ret; |
125 | } | ||
122 | 126 | ||
123 | /* guarantee free sections for fsync */ | 127 | /* guarantee free sections for fsync */ |
124 | f2fs_balance_fs(sbi); | 128 | f2fs_balance_fs(sbi); |
@@ -153,6 +157,7 @@ int f2fs_sync_file(struct file *file, loff_t start, loff_t end, int datasync) | |||
153 | } | 157 | } |
154 | out: | 158 | out: |
155 | mutex_unlock(&inode->i_mutex); | 159 | mutex_unlock(&inode->i_mutex); |
160 | trace_f2fs_sync_file_exit(inode, need_cp, datasync, ret); | ||
156 | return ret; | 161 | return ret; |
157 | } | 162 | } |
158 | 163 | ||