include/linux/nfs_xdr.h
Source file repositories/reference/linux-study-clean/include/linux/nfs_xdr.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nfs_xdr.h- Extension
.h- Size
- 44782 bytes
- Lines
- 1898
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/nfsacl.hlinux/sunrpc/gss_api.h
Detected Declarations
struct nfs4_stringstruct nfs_fsidstruct nfs4_thresholdstruct nfs_fattrstruct nfs_fsinfostruct nfs_fsstatstruct nfs2_fsstatstruct nfs_pathconfstruct nfs4_change_infostruct nfs_seqidstruct nfs4_channel_attrsstruct nfs4_slotstruct nfs4_sequence_argsstruct nfs4_sequence_resstruct nfs4_get_lease_time_argsstruct nfs4_get_lease_time_resstruct xdr_streamstruct nfs4_xdr_opaque_datastruct nfs4_xdr_opaque_opsstruct nfs4_xdr_opaque_datastruct nfs4_layoutdriver_datastruct pnfs_layout_rangestruct nfs4_layoutget_argsstruct nfs4_layoutget_resstruct nfs4_layoutgetstruct nfs4_getdeviceinfo_argsstruct nfs4_getdeviceinfo_resstruct nfs4_layoutcommit_argsstruct nfs4_layoutcommit_resstruct nfs4_layoutcommit_datastruct nfs4_layoutreturn_argsstruct nfs4_layoutreturn_resstruct nfs4_layoutreturnstruct nfs42_layoutstat_argsstruct nfs42_layoutstat_devinfostruct nfs42_layoutstat_devinfostruct nfs42_layoutstat_argsstruct nfs42_layoutstat_resstruct nfs42_layoutstat_datastruct nfs42_device_errorstruct nfs42_layout_errorstruct nfs42_layouterror_argsstruct nfs42_layouterror_resstruct nfs42_layouterror_datastruct nfs42_clone_argsstruct nfs42_clone_resstruct stateowner_idstruct nfs4_open_delegation
Annotated Snippet
const struct file_operations *file_ops;
const struct nlmclnt_operations *nlmclnt_ops;
int (*getroot) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);
int (*submount) (struct fs_context *, struct nfs_server *);
int (*try_get_tree) (struct fs_context *);
int (*getattr) (struct nfs_server *, struct nfs_fh *,
struct nfs_fattr *, struct inode *);
int (*setattr) (struct dentry *, struct nfs_fattr *,
struct iattr *);
int (*lookup) (struct inode *, struct dentry *, const struct qstr *,
struct nfs_fh *, struct nfs_fattr *);
int (*lookupp) (struct inode *, struct nfs_fh *,
struct nfs_fattr *);
int (*access) (struct inode *, struct nfs_access_entry *, const struct cred *);
int (*readlink)(struct inode *, struct page *, unsigned int,
unsigned int);
int (*create) (struct inode *, struct dentry *,
struct iattr *, int);
int (*remove) (struct inode *, struct dentry *);
void (*unlink_setup) (struct rpc_message *, struct dentry *, struct inode *);
void (*unlink_rpc_prepare) (struct rpc_task *, struct nfs_unlinkdata *);
int (*unlink_done) (struct rpc_task *, struct inode *);
void (*rename_setup) (struct rpc_message *msg,
struct dentry *old_dentry,
struct dentry *new_dentry,
struct inode *same_parent);
void (*rename_rpc_prepare)(struct rpc_task *task, struct nfs_renamedata *);
int (*rename_done) (struct rpc_task *task, struct inode *old_dir, struct inode *new_dir);
int (*link) (struct inode *, struct inode *, const struct qstr *);
int (*symlink) (struct inode *, struct dentry *, struct folio *,
unsigned int, struct iattr *);
struct dentry *(*mkdir) (struct inode *, struct dentry *, struct iattr *);
int (*rmdir) (struct inode *, const struct qstr *);
int (*readdir) (struct nfs_readdir_arg *, struct nfs_readdir_res *);
int (*mknod) (struct inode *, struct dentry *, struct iattr *,
dev_t);
int (*statfs) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsstat *);
int (*fsinfo) (struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);
int (*pathconf) (struct nfs_server *, struct nfs_fh *,
struct nfs_pathconf *);
int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, bool);
int (*pgio_rpc_prepare)(struct rpc_task *,
struct nfs_pgio_header *);
void (*read_setup)(struct nfs_pgio_header *, struct rpc_message *);
int (*read_done)(struct rpc_task *, struct nfs_pgio_header *);
void (*write_setup)(struct nfs_pgio_header *, struct rpc_message *,
struct rpc_clnt **);
int (*write_done)(struct rpc_task *, struct nfs_pgio_header *);
void (*commit_setup) (struct nfs_commit_data *, struct rpc_message *,
struct rpc_clnt **);
void (*commit_rpc_prepare)(struct rpc_task *, struct nfs_commit_data *);
int (*commit_done) (struct rpc_task *, struct nfs_commit_data *);
int (*lock)(struct file *, int, struct file_lock *);
int (*lock_check_bounds)(const struct file_lock *);
void (*clear_acl_cache)(struct inode *);
void (*close_context)(struct nfs_open_context *ctx, int);
struct inode * (*open_context) (struct inode *dir,
struct nfs_open_context *ctx,
int open_flags,
struct iattr *iattr,
int *);
int (*have_delegation)(struct inode *, fmode_t, int);
void (*return_delegation)(struct inode *);
struct nfs_client *(*alloc_client) (const struct nfs_client_initdata *);
struct nfs_client *(*init_client) (struct nfs_client *,
const struct nfs_client_initdata *);
void (*free_client) (struct nfs_client *);
struct nfs_server *(*create_server)(struct fs_context *);
struct nfs_server *(*clone_server)(struct nfs_server *, struct nfs_fh *,
struct nfs_fattr *, rpc_authflavor_t);
int (*discover_trunking)(struct nfs_server *, struct nfs_fh *);
void (*enable_swap)(struct inode *inode);
void (*disable_swap)(struct inode *inode);
};
/*
* Helper functions used by NFS client and/or server
*/
static inline void encode_opaque_fixed(struct xdr_stream *xdr,
const void *buf, size_t len)
{
WARN_ON_ONCE(xdr_stream_encode_opaque_fixed(xdr, buf, len) < 0);
}
static inline int decode_opaque_fixed(struct xdr_stream *xdr,
Annotation
- Immediate include surface: `linux/nfsacl.h`, `linux/sunrpc/gss_api.h`.
- Detected declarations: `struct nfs4_string`, `struct nfs_fsid`, `struct nfs4_threshold`, `struct nfs_fattr`, `struct nfs_fsinfo`, `struct nfs_fsstat`, `struct nfs2_fsstat`, `struct nfs_pathconf`, `struct nfs4_change_info`, `struct nfs_seqid`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.