summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-03-25 19:09:08 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-03-27 12:39:34 -0400
commit81b79afb504870a31ee1f764e81a202685cde795 (patch)
treebd1940c2c2a63430b1b1598a348b10026fd34afc
parentfc87701b918c05c2d78f8191f5bc3c6c178bdb3d (diff)
downloadop-kernel-dev-81b79afb504870a31ee1f764e81a202685cde795.zip
op-kernel-dev-81b79afb504870a31ee1f764e81a202685cde795.tar.gz
NFSv4: Allow tracing of NFSv4 fsync calls
I appear to have missed this when adding the ftrace probes. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
-rw-r--r--fs/nfs/nfs4file.c5
-rw-r--r--fs/nfs/nfstrace.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 8b46389..0de62f7 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -10,6 +10,8 @@
#include "fscache.h"
#include "pnfs.h"
+#include "nfstrace.h"
+
#ifdef CONFIG_NFS_V4_2
#include "nfs42.h"
#endif
@@ -100,6 +102,8 @@ nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
int ret;
struct inode *inode = file_inode(file);
+ trace_nfs_fsync_enter(inode);
+
do {
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret != 0)
@@ -118,6 +122,7 @@ nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
end = LLONG_MAX;
} while (ret == -EAGAIN);
+ trace_nfs_fsync_exit(inode, ret);
return ret;
}
diff --git a/fs/nfs/nfstrace.c b/fs/nfs/nfstrace.c
index 4eb0aea..c74f7af 100644
--- a/fs/nfs/nfstrace.c
+++ b/fs/nfs/nfstrace.c
@@ -7,3 +7,6 @@
#define CREATE_TRACE_POINTS
#include "nfstrace.h"
+
+EXPORT_TRACEPOINT_SYMBOL_GPL(nfs_fsync_enter);
+EXPORT_TRACEPOINT_SYMBOL_GPL(nfs_fsync_exit);
OpenPOWER on IntegriCloud