include/linux/nfslocalio.h
Source file repositories/reference/linux-study-clean/include/linux/nfslocalio.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nfslocalio.h- Extension
.h- Size
- 3575 bytes
- Lines
- 124
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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/module.hlinux/list.hlinux/uuid.hlinux/sunrpc/clnt.hlinux/sunrpc/svcauth.hlinux/nfs.hnet/net_namespace.h
Detected Declarations
struct nfs_clientstruct nfs_file_localiostruct nfsd_localio_operationsstruct nfs_file_localiostruct nfs_clientfunction nfs_to_nfsd_net_putfunction nfs_to_nfsd_file_put_localfunction nfs_close_local_fhfunction nfs_localio_disable_client
Annotated Snippet
struct nfsd_localio_operations {
bool (*nfsd_net_try_get)(struct net *);
void (*nfsd_net_put)(struct net *);
struct nfsd_file *(*nfsd_open_local_fh)(struct net *,
struct auth_domain *,
struct rpc_clnt *,
const struct cred *,
const struct nfs_fh *,
struct nfsd_file __rcu **pnf,
const fmode_t);
struct net *(*nfsd_file_put_local)(struct nfsd_file __rcu **);
struct file *(*nfsd_file_file)(struct nfsd_file *);
void (*nfsd_file_dio_alignment)(struct nfsd_file *,
u32 *, u32 *, u32 *);
} ____cacheline_aligned;
extern void nfsd_localio_ops_init(void);
extern const struct nfsd_localio_operations *nfs_to;
struct nfsd_file *nfs_open_local_fh(nfs_uuid_t *,
struct rpc_clnt *, const struct cred *,
const struct nfs_fh *, struct nfs_file_localio *,
struct nfsd_file __rcu **pnf,
const fmode_t);
static inline void nfs_to_nfsd_net_put(struct net *net)
{
/*
* Once reference to net (and associated nfsd_serv) is dropped, NFSD
* could be unloaded, so ensure safe return from nfsd_net_put() by
* always taking RCU.
*/
rcu_read_lock();
nfs_to->nfsd_net_put(net);
rcu_read_unlock();
}
static inline void nfs_to_nfsd_file_put_local(struct nfsd_file __rcu **localio)
{
/*
* Either *localio must be guaranteed to be non-NULL, or caller
* must prevent nfsd shutdown from completing as nfs_close_local_fh()
* does by blocking the nfs_uuid from being finally put.
*/
struct net *net;
net = nfs_to->nfsd_file_put_local(localio);
if (net)
nfs_to_nfsd_net_put(net);
}
#else /* CONFIG_NFS_LOCALIO */
struct nfs_file_localio;
static inline void nfs_close_local_fh(struct nfs_file_localio *nfl)
{
}
static inline void nfsd_localio_ops_init(void)
{
}
struct nfs_client;
static inline void nfs_localio_disable_client(struct nfs_client *clp)
{
}
#endif /* CONFIG_NFS_LOCALIO */
#endif /* __LINUX_NFSLOCALIO_H */
Annotation
- Immediate include surface: `linux/module.h`, `linux/list.h`, `linux/uuid.h`, `linux/sunrpc/clnt.h`, `linux/sunrpc/svcauth.h`, `linux/nfs.h`, `net/net_namespace.h`.
- Detected declarations: `struct nfs_client`, `struct nfs_file_localio`, `struct nfsd_localio_operations`, `struct nfs_file_localio`, `struct nfs_client`, `function nfs_to_nfsd_net_put`, `function nfs_to_nfsd_file_put_local`, `function nfs_close_local_fh`, `function nfs_localio_disable_client`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.