[PATCH 06/11] NFS: Add tracepoints for nfs_readdir_xdr_filler enter and exit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add tracepoints for entry and exit to nfs_readdir_xdr_filler.
Note the exit trace event captures the results of over the wire
READDIR operations, regardless of NFS version.

Signed-off-by: Dave Wysochanski <dwysocha@xxxxxxxxxx>
---
 fs/nfs/dir.c      | 2 ++
 fs/nfs/nfstrace.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e4cd9789ebb5..d1e9ba28c4a0 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -361,6 +361,7 @@ int nfs_readdir_xdr_filler(struct page **pages, nfs_readdir_descriptor_t *desc,
 	int		error;
 
  again:
+	trace_nfs_readdir_xdr_filler_enter(desc);
 	timestamp = jiffies;
 	gencount = nfs_inc_attr_generation_counter();
 	desc->dir_verifier = nfs_save_change_attribute(inode);
@@ -379,6 +380,7 @@ int nfs_readdir_xdr_filler(struct page **pages, nfs_readdir_descriptor_t *desc,
 	desc->timestamp = timestamp;
 	desc->gencount = gencount;
 error:
+	trace_nfs_readdir_xdr_filler_exit(desc, error);
 	return error;
 }
 
diff --git a/fs/nfs/nfstrace.h b/fs/nfs/nfstrace.h
index 0ed330f323bb..5dbadd2718e3 100644
--- a/fs/nfs/nfstrace.h
+++ b/fs/nfs/nfstrace.h
@@ -926,6 +926,8 @@
 DEFINE_NFS_READDIR_DESCRIPTOR_EVENT_EXIT(nfs_readdir_search_pagecache_exit);
 DEFINE_NFS_READDIR_DESCRIPTOR_EVENT(nfs_readdir_search_array_enter);
 DEFINE_NFS_READDIR_DESCRIPTOR_EVENT_EXIT(nfs_readdir_search_array_exit);
+DEFINE_NFS_READDIR_DESCRIPTOR_EVENT(nfs_readdir_xdr_filler_enter);
+DEFINE_NFS_READDIR_DESCRIPTOR_EVENT_EXIT(nfs_readdir_xdr_filler_exit);
 
 TRACE_EVENT(nfs_link_enter,
 		TP_PROTO(
-- 
1.8.3.1




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux