diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-19 18:59:33 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-22 08:58:17 -0400 |
commit | f4ce1299b329e96bb247c95c4fee8809827d6931 (patch) | |
tree | b4056d4f78b0594f84c8e4b3beda565a05751993 /fs/nfs/file.c | |
parent | 1264a2f053a32376696e51184f086d35113e75ff (diff) |
NFS: Add event tracing for generic NFS events
Add tracepoints for inode attribute updates, attribute revalidation,
writeback start/end fsync start/end, attribute change start/end,
permission check start/end.
The intention is to enable performance tracing using 'perf'as well as
improving debugging.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 94e94bd11aae..d6a9db0a8545 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include "iostat.h" | 37 | #include "iostat.h" |
38 | #include "fscache.h" | 38 | #include "fscache.h" |
39 | 39 | ||
40 | #include "nfstrace.h" | ||
41 | |||
40 | #define NFSDBG_FACILITY NFSDBG_FILE | 42 | #define NFSDBG_FACILITY NFSDBG_FILE |
41 | 43 | ||
42 | static const struct vm_operations_struct nfs_file_vm_ops; | 44 | static const struct vm_operations_struct nfs_file_vm_ops; |
@@ -294,6 +296,8 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | |||
294 | int ret; | 296 | int ret; |
295 | struct inode *inode = file_inode(file); | 297 | struct inode *inode = file_inode(file); |
296 | 298 | ||
299 | trace_nfs_fsync_enter(inode); | ||
300 | |||
297 | do { | 301 | do { |
298 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); | 302 | ret = filemap_write_and_wait_range(inode->i_mapping, start, end); |
299 | if (ret != 0) | 303 | if (ret != 0) |
@@ -310,6 +314,7 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync) | |||
310 | end = LLONG_MAX; | 314 | end = LLONG_MAX; |
311 | } while (ret == -EAGAIN); | 315 | } while (ret == -EAGAIN); |
312 | 316 | ||
317 | trace_nfs_fsync_exit(inode, ret); | ||
313 | return ret; | 318 | return ret; |
314 | } | 319 | } |
315 | 320 | ||