summaryrefslogtreecommitdiff
path: root/fs/nfsd/trace.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-07-08 21:25:57 +0300
committerChuck Lever <chuck.lever@oracle.com>2022-07-30 03:11:50 +0300
commita845511007a63467fee575353c706806c21218b1 (patch)
treeb6a3170235b9176ae903e7156478e7197f8f611b /fs/nfsd/trace.h
parent8755326399f471ec3b31e2ab8c5074c0d28a0fb5 (diff)
downloadlinux-a845511007a63467fee575353c706806c21218b1.tar.xz
NFSD: Refactor __nfsd_file_close_inode()
The code that computes the hashval is the same in both callers. To prevent them from going stale, reframe the documenting comments to remove descriptions of the underlying hash table structure, which is about to be replaced. Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/trace.h')
-rw-r--r--fs/nfsd/trace.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index 9a146d71ad9e..79bf985bfc7d 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -848,30 +848,52 @@ TRACE_EVENT(nfsd_file_open,
DECLARE_EVENT_CLASS(nfsd_file_search_class,
TP_PROTO(
- struct inode *inode,
- int found
+ const struct inode *inode,
+ unsigned int count
),
- TP_ARGS(inode, found),
+ TP_ARGS(inode, count),
TP_STRUCT__entry(
- __field(struct inode *, inode)
- __field(int, found)
+ __field(const struct inode *, inode)
+ __field(unsigned int, count)
),
TP_fast_assign(
__entry->inode = inode;
- __entry->found = found;
+ __entry->count = count;
),
- TP_printk("inode=%p found=%d",
- __entry->inode, __entry->found)
+ TP_printk("inode=%p count=%u",
+ __entry->inode, __entry->count)
);
#define DEFINE_NFSD_FILE_SEARCH_EVENT(name) \
DEFINE_EVENT(nfsd_file_search_class, name, \
- TP_PROTO(struct inode *inode, int found), \
- TP_ARGS(inode, found))
+ TP_PROTO( \
+ const struct inode *inode, \
+ unsigned int count \
+ ), \
+ TP_ARGS(inode, count))
DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode_sync);
DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_close_inode);
-DEFINE_NFSD_FILE_SEARCH_EVENT(nfsd_file_is_cached);
+
+TRACE_EVENT(nfsd_file_is_cached,
+ TP_PROTO(
+ const struct inode *inode,
+ int found
+ ),
+ TP_ARGS(inode, found),
+ TP_STRUCT__entry(
+ __field(const struct inode *, inode)
+ __field(int, found)
+ ),
+ TP_fast_assign(
+ __entry->inode = inode;
+ __entry->found = found;
+ ),
+ TP_printk("inode=%p is %scached",
+ __entry->inode,
+ __entry->found ? "" : "not "
+ )
+);
TRACE_EVENT(nfsd_file_fsnotify_handle_event,
TP_PROTO(struct inode *inode, u32 mask),