fs/nfsd/nfsd.h
Source file repositories/reference/linux-study-clean/fs/nfsd/nfsd.h
File Facts
- System
- Linux kernel
- Corpus path
fs/nfsd/nfsd.h- Extension
.h- Size
- 22029 bytes
- Lines
- 593
- 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.
- 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/types.hlinux/mount.hlinux/nfs.hlinux/nfs2.hlinux/nfs3.hlinux/nfs4.hlinux/sunrpc/svc.hlinux/sunrpc/svc_xprt.hlinux/sunrpc/msg_prot.hlinux/sunrpc/addr.huapi/linux/nfsd/debug.hexport.hnetns.hstats.h
Detected Declarations
struct readdir_cdstruct nfsd_thread_local_infostruct nfsd_voidargsstruct nfsd_voidresstruct nfsdfs_clientstruct nfsd_netenum vers_opfunction nfsd_debugfs_initfunction nfsd_v4clientfunction nfsd_user_namespacefunction nfsd4_init_slabsfunction nfsd4_free_slabsfunction nfs4_state_start_netfunction nfs4_state_shutdownfunction nfs4_recoverydirfunction nfsd4_spo_must_allowfunction nfsd4_create_laundry_wqfunction nfsd4_destroy_laundry_wqfunction nfsd_wait_for_delegreturnfunction nfsd4_set_netaddrfunction bmval_is_subsetfunction nfsd_attrs_supportedfunction nfsd4_is_junctionfunction nfsd4_init_leases_net
Annotated Snippet
struct readdir_cd {
__be32 err; /* 0, nfserr, or nfserr_eof */
};
/* Maximum number of operations per session compound */
#define NFSD_MAX_OPS_PER_COMPOUND 200
extern struct svc_program nfsd_programs[];
extern const struct svc_version nfsd_version2, nfsd_version3, nfsd_version4;
extern struct mutex nfsd_mutex;
extern atomic_t nfsd_th_cnt; /* number of available threads */
extern const struct seq_operations nfs_exports_op;
struct nfsd_thread_local_info {
struct nfs4_client **ntli_lease_breaker;
int ntli_cachetype;
};
/*
* Common void argument and result helpers
*/
struct nfsd_voidargs { };
struct nfsd_voidres { };
bool nfssvc_decode_voidarg(struct svc_rqst *rqstp,
struct xdr_stream *xdr);
bool nfssvc_encode_voidres(struct svc_rqst *rqstp,
struct xdr_stream *xdr);
/*
* Function prototypes.
*/
int nfsd_svc(int n, int *nservers, struct net *net,
const struct cred *cred, const char *scope);
int nfsd_dispatch(struct svc_rqst *rqstp);
int nfsd_nrthreads(struct net *);
int nfsd_nrpools(struct net *);
int nfsd_get_nrthreads(int n, int *, struct net *);
int nfsd_set_nrthreads(int n, int *, struct net *);
void nfsd_shutdown_threads(struct net *net);
struct svc_rqst *nfsd_current_rqst(void);
struct nfsdfs_client {
struct kref cl_ref;
void (*cl_release)(struct kref *kref);
};
struct nfsdfs_client *get_nfsdfs_client(struct inode *);
struct dentry *nfsd_client_mkdir(struct nfsd_net *nn,
struct nfsdfs_client *ncl, u32 id,
const struct tree_descr *,
struct dentry **fdentries);
void nfsd_client_rmdir(struct dentry *dentry);
int nfsd_cache_notify(struct cache_detail *cd, struct cache_head *h, u32 cache_type);
#if defined(CONFIG_NFSD_V2_ACL) || defined(CONFIG_NFSD_V3_ACL)
#ifdef CONFIG_NFSD_V2_ACL
extern const struct svc_version nfsd_acl_version2;
#else
#define nfsd_acl_version2 NULL
#endif
#ifdef CONFIG_NFSD_V3_ACL
extern const struct svc_version nfsd_acl_version3;
#else
#define nfsd_acl_version3 NULL
#endif
#endif
#if IS_ENABLED(CONFIG_NFS_LOCALIO)
extern const struct svc_version localio_version1;
#endif
struct nfsd_net;
enum vers_op {NFSD_SET, NFSD_CLEAR, NFSD_TEST, NFSD_AVAIL };
int nfsd_vers(struct nfsd_net *nn, int vers, enum vers_op change);
int nfsd_minorversion(struct nfsd_net *nn, u32 minorversion, enum vers_op change);
void nfsd_reset_versions(struct nfsd_net *nn);
int nfsd_create_serv(struct net *net);
void nfsd_destroy_serv(struct net *net);
#ifdef CONFIG_DEBUG_FS
void nfsd_debugfs_init(void);
void nfsd_debugfs_exit(void);
#else
static inline void nfsd_debugfs_init(void) {}
static inline void nfsd_debugfs_exit(void) {}
#endif
Annotation
- Immediate include surface: `linux/types.h`, `linux/mount.h`, `linux/nfs.h`, `linux/nfs2.h`, `linux/nfs3.h`, `linux/nfs4.h`, `linux/sunrpc/svc.h`, `linux/sunrpc/svc_xprt.h`.
- Detected declarations: `struct readdir_cd`, `struct nfsd_thread_local_info`, `struct nfsd_voidargs`, `struct nfsd_voidres`, `struct nfsdfs_client`, `struct nfsd_net`, `enum vers_op`, `function nfsd_debugfs_init`, `function nfsd_v4client`, `function nfsd_user_namespace`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source 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.