summaryrefslogtreecommitdiff
path: root/fs/nfsd/trace.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2021-05-14 15:55:36 -0400
committerJ. Bruce Fields <bfields@redhat.com>2021-05-18 13:44:03 -0400
commit744ea54c869cebe41fbad5f53f8a8ca5d93a5c97 (patch)
treeadb7fc452412189acacde5ae3c77fe6c5fb44d81 /fs/nfsd/trace.h
parent27787733ef44332fce749aa853f2749d141982b0 (diff)
downloadlwn-744ea54c869cebe41fbad5f53f8a8ca5d93a5c97.tar.gz
lwn-744ea54c869cebe41fbad5f53f8a8ca5d93a5c97.zip
NFSD: Add nfsd_clid_verf_mismatch tracepoint
Record when a client presents a different boot verifier than the one we know about. Typically this is a sign the client has rebooted, but sometimes it signals a conflicting client ID, which the client's administrator will need to address. 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.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/fs/nfsd/trace.h b/fs/nfsd/trace.h
index 820a542e1013..24f54ab20eed 100644
--- a/fs/nfsd/trace.h
+++ b/fs/nfsd/trace.h
@@ -564,6 +564,38 @@ TRACE_EVENT(nfsd_clid_cred_mismatch,
)
)
+TRACE_EVENT(nfsd_clid_verf_mismatch,
+ TP_PROTO(
+ const struct nfs4_client *clp,
+ const struct svc_rqst *rqstp,
+ const nfs4_verifier *verf
+ ),
+ TP_ARGS(clp, rqstp, verf),
+ TP_STRUCT__entry(
+ __field(u32, cl_boot)
+ __field(u32, cl_id)
+ __array(unsigned char, cl_verifier, NFS4_VERIFIER_SIZE)
+ __array(unsigned char, new_verifier, NFS4_VERIFIER_SIZE)
+ __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;
+ memcpy(__entry->cl_verifier, (void *)&clp->cl_verifier,
+ NFS4_VERIFIER_SIZE);
+ memcpy(__entry->new_verifier, (void *)verf,
+ NFS4_VERIFIER_SIZE);
+ memcpy(__entry->addr, &rqstp->rq_xprt->xpt_remote,
+ sizeof(struct sockaddr_in6));
+ ),
+ TP_printk("client %08x:%08x verf=0x%s, updated=0x%s from addr=%pISpc",
+ __entry->cl_boot, __entry->cl_id,
+ __print_hex_str(__entry->cl_verifier, NFS4_VERIFIER_SIZE),
+ __print_hex_str(__entry->new_verifier, NFS4_VERIFIER_SIZE),
+ __entry->addr
+ )
+);
+
TRACE_EVENT(nfsd_clid_inuse_err,
TP_PROTO(const struct nfs4_client *clp),
TP_ARGS(clp),