fs/nfs_common/localio_trace.h

Source file repositories/reference/linux-study-clean/fs/nfs_common/localio_trace.h

File Facts

System
Linux kernel
Corpus path
fs/nfs_common/localio_trace.h
Extension
.h
Size
1351 bytes
Lines
57
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.

Dependency Surface

Detected Declarations

Annotated Snippet

#undef TRACE_SYSTEM
#define TRACE_SYSTEM nfs_localio

#if !defined(_TRACE_NFS_COMMON_LOCALIO_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_NFS_COMMON_LOCALIO_H

#include <linux/tracepoint.h>

#include <trace/misc/fs.h>
#include <trace/misc/nfs.h>
#include <trace/misc/sunrpc.h>

DECLARE_EVENT_CLASS(nfs_local_client_event,
		TP_PROTO(
			const struct nfs_client *clp
		),

		TP_ARGS(clp),

		TP_STRUCT__entry(
			__field(unsigned int, protocol)
			__string(server, clp->cl_hostname)
		),

		TP_fast_assign(
			__entry->protocol = clp->rpc_ops->version;
			__assign_str(server);
		),

		TP_printk(
			"server=%s NFSv%u", __get_str(server), __entry->protocol
		)
);

#define DEFINE_NFS_LOCAL_CLIENT_EVENT(name) \
	DEFINE_EVENT(nfs_local_client_event, name, \
			TP_PROTO( \
				const struct nfs_client *clp \
			), \
			TP_ARGS(clp))

DEFINE_NFS_LOCAL_CLIENT_EVENT(nfs_localio_enable_client);
DEFINE_NFS_LOCAL_CLIENT_EVENT(nfs_localio_disable_client);

#endif /* _TRACE_NFS_COMMON_LOCALIO_H */

#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_FILE localio_trace
/* This part must be outside protection */
#include <trace/define_trace.h>

Annotation

Implementation Notes