@@ -2372,6 +2372,25 @@ TRACE_EVENT(nfsd_setattr,
)
)
+TRACE_EVENT(nfsd_lookup_dentry,
+ TP_PROTO(struct svc_rqst *rqstp,
+ struct svc_fh *fhp,
+ const char *name,
+ unsigned int len),
+ TP_ARGS(rqstp, fhp, name, len),
+ TP_STRUCT__entry(
+ SVC_RQST_ENDPOINT_FIELDS(rqstp)
+ __field(u32, fh_hash)
+ __string_len(name, name, len)
+ ),
+ TP_fast_assign(
+ SVC_RQST_ENDPOINT_ASSIGNMENTS(rqstp);
+ __entry->fh_hash = knfsd_fh_hash(&fhp->fh_handle);
+ __assign_str(name);
+ ),
+ TP_printk("xid=0x%08x fh_hash=0x%08x name=%s",
+ __entry->xid, __entry->fh_hash, __get_str(name))
+);
#endif /* _NFSD_TRACE_H */
#undef TRACE_INCLUDE_PATH
@@ -246,7 +246,7 @@ nfsd_lookup_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp,
struct dentry *dentry;
int host_err;
- dprintk("nfsd: nfsd_lookup(fh %s, %.*s)\n", SVCFH_fmt(fhp), len,name);
+ trace_nfsd_lookup_dentry(rqstp, fhp, name, len);
dparent = fhp->fh_dentry;
exp = exp_get(fhp->fh_export);
...and drop the dprintk. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- fs/nfsd/trace.h | 19 +++++++++++++++++++ fs/nfsd/vfs.c | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-)