fs/nfsd/trace.h
Source file repositories/reference/linux-study-clean/fs/nfsd/trace.h
File Facts
- System
- Linux kernel
- Corpus path
fs/nfsd/trace.h- Extension
.h- Size
- 73797 bytes
- Lines
- 2758
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/tracepoint.hlinux/sunrpc/clnt.hlinux/sunrpc/xprt.htrace/misc/fs.htrace/misc/nfs.htrace/misc/sunrpc.hexport.hnfsfh.hxdr4.hstate.hfilecache.hvfs.hcache.htrace/define_trace.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#undef TRACE_SYSTEM
#define TRACE_SYSTEM nfsd
#if !defined(_NFSD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _NFSD_TRACE_H
#include <linux/tracepoint.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/xprt.h>
#include <trace/misc/fs.h>
#include <trace/misc/nfs.h>
#include <trace/misc/sunrpc.h>
#include "export.h"
#include "nfsfh.h"
#include "xdr4.h"
#define NFSD_TRACE_PROC_CALL_FIELDS(r) \
__field(unsigned int, netns_ino) \
__field(u32, xid) \
__sockaddr(server, (r)->rq_xprt->xpt_locallen) \
__sockaddr(client, (r)->rq_xprt->xpt_remotelen)
#define NFSD_TRACE_PROC_CALL_ASSIGNMENTS(r) \
do { \
struct svc_xprt *xprt = (r)->rq_xprt; \
__entry->netns_ino = SVC_NET(r)->ns.inum; \
__entry->xid = be32_to_cpu((r)->rq_xid); \
__assign_sockaddr(server, &xprt->xpt_local, \
xprt->xpt_locallen); \
__assign_sockaddr(client, &xprt->xpt_remote, \
xprt->xpt_remotelen); \
} while (0)
#define NFSD_TRACE_PROC_RES_FIELDS(r) \
__field(unsigned int, netns_ino) \
__field(u32, xid) \
__field(unsigned long, status) \
__sockaddr(server, (r)->rq_xprt->xpt_locallen) \
__sockaddr(client, (r)->rq_xprt->xpt_remotelen)
#define NFSD_TRACE_PROC_RES_ASSIGNMENTS(r, error) \
do { \
struct svc_xprt *xprt = (r)->rq_xprt; \
__entry->netns_ino = SVC_NET(r)->ns.inum; \
__entry->xid = be32_to_cpu((r)->rq_xid); \
__entry->status = be32_to_cpu(error); \
__assign_sockaddr(server, &xprt->xpt_local, \
xprt->xpt_locallen); \
__assign_sockaddr(client, &xprt->xpt_remote, \
xprt->xpt_remotelen); \
} while (0);
DECLARE_EVENT_CLASS(nfsd_xdr_err_class,
TP_PROTO(
const struct svc_rqst *rqstp
),
TP_ARGS(rqstp),
TP_STRUCT__entry(
__field(unsigned int, netns_ino)
__field(u32, xid)
__field(u32, vers)
__field(u32, proc)
__sockaddr(server, rqstp->rq_xprt->xpt_locallen)
__sockaddr(client, rqstp->rq_xprt->xpt_remotelen)
),
TP_fast_assign(
const struct svc_xprt *xprt = rqstp->rq_xprt;
__entry->netns_ino = xprt->xpt_net->ns.inum;
__entry->xid = be32_to_cpu(rqstp->rq_xid);
__entry->vers = rqstp->rq_vers;
__entry->proc = rqstp->rq_proc;
__assign_sockaddr(server, &xprt->xpt_local, xprt->xpt_locallen);
__assign_sockaddr(client, &xprt->xpt_remote, xprt->xpt_remotelen);
),
TP_printk("xid=0x%08x vers=%u proc=%u",
__entry->xid, __entry->vers, __entry->proc
)
);
#define DEFINE_NFSD_XDR_ERR_EVENT(name) \
DEFINE_EVENT(nfsd_xdr_err_class, nfsd_##name##_err, \
TP_PROTO(const struct svc_rqst *rqstp), \
TP_ARGS(rqstp))
DEFINE_NFSD_XDR_ERR_EVENT(garbage_args);
DEFINE_NFSD_XDR_ERR_EVENT(cant_encode);
DECLARE_EVENT_CLASS(nfsd_dynthread_class,
Annotation
- Immediate include surface: `linux/tracepoint.h`, `linux/sunrpc/clnt.h`, `linux/sunrpc/xprt.h`, `trace/misc/fs.h`, `trace/misc/nfs.h`, `trace/misc/sunrpc.h`, `export.h`, `nfsfh.h`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.