NFSv4: Allow tracing of NFSv4 fsync calls
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 25 Mar 2015 23:09:08 +0000 (19:09 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 27 Mar 2015 16:39:34 +0000 (12:39 -0400)
I appear to have missed this when adding the ftrace probes.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4file.c
fs/nfs/nfstrace.c

index 8b46389c4c5b814806979b66348121afe0590090..0de62f7cfebfef787b00aef18a9d907007121e48 100644 (file)
@@ -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;
 }
 
index 4eb0aead69b6c954de19f64099fdd9268f36350d..c74f7af23d77a756b1f785fa78723c00c26a4312 100644 (file)
@@ -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);