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.

Dependency Surface

Detected Declarations

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

Implementation Notes