diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-05-14 15:55:29 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2021-05-18 13:44:02 -0400 |
commit | 27787733ef44332fce749aa853f2749d141982b0 (patch) | |
tree | 4c9c3719927515e1912c29fbfcee2a9aa7df4646 /fs/nfsd/trace.h | |
parent | 87b2394d60c32c158ebb96ace4abee883baf1239 (diff) |
NFSD: Add nfsd_clid_cred_mismatch tracepoint
Record when a client tries to establish a lease record but uses an
unexpected credential. This is often a sign of a configuration
problem.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/trace.h')
-rw-r--r-- | fs/nfsd/trace.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h index 1b50640cdf96..820a542e1013 100644 --- a/fs/nfsd/trace.h +++ b/fs/nfsd/trace.h @@ -536,6 +536,34 @@ DEFINE_EVENT(nfsd_net_class, nfsd_##name, \ DEFINE_NET_EVENT(grace_start); DEFINE_NET_EVENT(grace_complete); +TRACE_EVENT(nfsd_clid_cred_mismatch, + TP_PROTO( + const struct nfs4_client *clp, + const struct svc_rqst *rqstp + ), + TP_ARGS(clp, rqstp), + TP_STRUCT__entry( + __field(u32, cl_boot) + __field(u32, cl_id) + __field(unsigned long, cl_flavor) + __field(unsigned long, new_flavor) + __array(unsigned char, addr, sizeof(struct sockaddr_in6)) + ), + TP_fast_assign( + __entry->cl_boot = clp->cl_clientid.cl_boot; + __entry->cl_id = clp->cl_clientid.cl_id; + __entry->cl_flavor = clp->cl_cred.cr_flavor; + __entry->new_flavor = rqstp->rq_cred.cr_flavor; + memcpy(__entry->addr, &rqstp->rq_xprt->xpt_remote, + sizeof(struct sockaddr_in6)); + ), + TP_printk("client %08x:%08x flavor=%s, conflict=%s from addr=%pISpc", + __entry->cl_boot, __entry->cl_id, + show_nfsd_authflavor(__entry->cl_flavor), + show_nfsd_authflavor(__entry->new_flavor), __entry->addr + ) +) + TRACE_EVENT(nfsd_clid_inuse_err, TP_PROTO(const struct nfs4_client *clp), TP_ARGS(clp), |