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>
This commit is contained in:
@@ -10,6 +10,8 @@
|
|||||||
#include "fscache.h"
|
#include "fscache.h"
|
||||||
#include "pnfs.h"
|
#include "pnfs.h"
|
||||||
|
|
||||||
|
#include "nfstrace.h"
|
||||||
|
|
||||||
#ifdef CONFIG_NFS_V4_2
|
#ifdef CONFIG_NFS_V4_2
|
||||||
#include "nfs42.h"
|
#include "nfs42.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -100,6 +102,8 @@ nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
|||||||
int ret;
|
int ret;
|
||||||
struct inode *inode = file_inode(file);
|
struct inode *inode = file_inode(file);
|
||||||
|
|
||||||
|
trace_nfs_fsync_enter(inode);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
|
ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
@@ -118,6 +122,7 @@ nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
|||||||
end = LLONG_MAX;
|
end = LLONG_MAX;
|
||||||
} while (ret == -EAGAIN);
|
} while (ret == -EAGAIN);
|
||||||
|
|
||||||
|
trace_nfs_fsync_exit(inode, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,3 +7,6 @@
|
|||||||
|
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include "nfstrace.h"
|
#include "nfstrace.h"
|
||||||
|
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(nfs_fsync_enter);
|
||||||
|
EXPORT_TRACEPOINT_SYMBOL_GPL(nfs_fsync_exit);
|
||||||
|
Reference in New Issue
Block a user