Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSD: Add a Call equivalent to the NFSD_TRACE_PROC_RES macros

Introduce tracing helpers that can be used before the procedure
status code is known. These macros are similar to the
SVC_RQST_ENDPOINT helpers, but they can be modified to include
NFS-specific fields if that is needed later.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

Chuck Lever 218927aa 45e3eda4

+17
+17
fs/nfsd/trace.h
··· 18 18 #include "nfsfh.h" 19 19 #include "xdr4.h" 20 20 21 + #define NFSD_TRACE_PROC_CALL_FIELDS(r) \ 22 + __field(unsigned int, netns_ino) \ 23 + __field(u32, xid) \ 24 + __sockaddr(server, (r)->rq_xprt->xpt_locallen) \ 25 + __sockaddr(client, (r)->rq_xprt->xpt_remotelen) 26 + 27 + #define NFSD_TRACE_PROC_CALL_ASSIGNMENTS(r) \ 28 + do { \ 29 + struct svc_xprt *xprt = (r)->rq_xprt; \ 30 + __entry->netns_ino = SVC_NET(r)->ns.inum; \ 31 + __entry->xid = be32_to_cpu((r)->rq_xid); \ 32 + __assign_sockaddr(server, &xprt->xpt_local, \ 33 + xprt->xpt_locallen); \ 34 + __assign_sockaddr(client, &xprt->xpt_remote, \ 35 + xprt->xpt_remotelen); \ 36 + } while (0) 37 + 21 38 #define NFSD_TRACE_PROC_RES_FIELDS(r) \ 22 39 __field(unsigned int, netns_ino) \ 23 40 __field(u32, xid) \