include/linux/nfs_fs.h
Source file repositories/reference/linux-study-clean/include/linux/nfs_fs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/nfs_fs.h- Extension
.h- Size
- 21310 bytes
- Lines
- 715
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
uapi/linux/nfs_fs.hlinux/in.hlinux/mm.hlinux/pagemap.hlinux/rbtree.hlinux/refcount.hlinux/rwsem.hlinux/wait.hlinux/sunrpc/debug.hlinux/sunrpc/auth.hlinux/sunrpc/clnt.hlinux/netfs.hlinux/nfs.hlinux/nfs2.hlinux/nfs3.hlinux/nfs4.hlinux/nfs_xdr.hlinux/nfs_fs_sb.hlinux/mempool.h
Detected Declarations
struct nfs_access_entrystruct nfs_lock_contextstruct nfs_file_localiostruct nfs4_statestruct nfs_open_contextstruct nfs_open_dir_contextstruct nfs_delegationstruct posix_aclstruct nfs4_xattr_cachestruct nfs_inodestruct nfs4_copy_statefunction nfs_localio_file_initfunction BITfunction NFS_MINATTRTIMEOfunction NFS_MAXATTRTIMEOfunction NFS_STALEfunction NFS_FILEIDfunction set_nfs_fileidfunction nfs_mark_for_revalidatefunction nfs_server_capablefunction nfs_save_change_attributefunction nfs4_label_freefunction nfs_free_fattrfunction nfs_free_fhandlefunction nfs_display_fhandle_hashfunction nfs_display_fhandle_hashfunction nfs_display_fhandlefunction nfs_have_writebacksfunction nfs_size_to_loff_tfunction nfs_fileid_to_ino_tfunction nfs_ooo_clearfunction nfs_ooo_test
Annotated Snippet
extern const struct file_operations nfs_file_operations;
#if IS_ENABLED(CONFIG_NFS_V4)
extern const struct file_operations nfs4_file_operations;
#endif /* CONFIG_NFS_V4 */
extern const struct address_space_operations nfs_file_aops;
extern const struct address_space_operations nfs_dir_aops;
static inline struct nfs_open_context *nfs_file_open_context(struct file *filp)
{
return filp->private_data;
}
static inline const struct cred *nfs_file_cred(struct file *file)
{
if (file != NULL) {
struct nfs_open_context *ctx =
nfs_file_open_context(file);
if (ctx)
return ctx->cred;
}
return NULL;
}
/*
* linux/fs/nfs/direct.c
*/
int nfs_swap_rw(struct kiocb *iocb, struct iov_iter *iter);
ssize_t nfs_file_direct_read(struct kiocb *iocb,
struct iov_iter *iter, bool swap);
ssize_t nfs_file_direct_write(struct kiocb *iocb,
struct iov_iter *iter, bool swap);
/*
* linux/fs/nfs/dir.c
*/
extern const struct file_operations nfs_dir_operations;
extern const struct dentry_operations nfs_dentry_operations;
extern void nfs_force_lookup_revalidate(struct inode *dir);
extern void nfs_set_verifier(struct dentry * dentry, unsigned long verf);
#if IS_ENABLED(CONFIG_NFS_V4)
extern void nfs_clear_verifier_delegated(struct inode *inode);
#endif /* IS_ENABLED(CONFIG_NFS_V4) */
extern struct dentry *nfs_add_or_obtain(struct dentry *dentry,
struct nfs_fh *fh, struct nfs_fattr *fattr);
extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh,
struct nfs_fattr *fattr);
extern int nfs_may_open(struct inode *inode, const struct cred *cred, int openflags);
extern void nfs_access_zap_cache(struct inode *inode);
extern int nfs_access_get_cached(struct inode *inode, const struct cred *cred,
u32 *mask, bool may_block);
extern int nfs_atomic_open_v23(struct inode *dir, struct dentry *dentry,
struct file *file, unsigned int open_flags,
umode_t mode);
/*
* linux/fs/nfs/symlink.c
*/
extern const struct inode_operations nfs_symlink_inode_operations;
/*
* linux/fs/nfs/sysctl.c
*/
#ifdef CONFIG_SYSCTL
extern int nfs_register_sysctl(void);
extern void nfs_unregister_sysctl(void);
#else
#define nfs_register_sysctl() 0
#define nfs_unregister_sysctl() do { } while(0)
#endif
/*
* linux/fs/nfs/namespace.c
*/
extern const struct inode_operations nfs_mountpoint_inode_operations;
extern const struct inode_operations nfs_referral_inode_operations;
extern int nfs_mountpoint_expiry_timeout;
extern void nfs_release_automount_timer(void);
/*
* linux/fs/nfs/unlink.c
*/
extern void nfs_complete_unlink(struct dentry *dentry, struct inode *);
/*
* linux/fs/nfs/write.c
*/
extern int nfs_congestion_kb;
extern int nfs_writepages(struct address_space *, struct writeback_control *);
extern int nfs_flush_incompatible(struct file *file, struct folio *folio);
Annotation
- Immediate include surface: `uapi/linux/nfs_fs.h`, `linux/in.h`, `linux/mm.h`, `linux/pagemap.h`, `linux/rbtree.h`, `linux/refcount.h`, `linux/rwsem.h`, `linux/wait.h`.
- Detected declarations: `struct nfs_access_entry`, `struct nfs_lock_context`, `struct nfs_file_localio`, `struct nfs4_state`, `struct nfs_open_context`, `struct nfs_open_dir_context`, `struct nfs_delegation`, `struct posix_acl`, `struct nfs4_xattr_cache`, `struct nfs_inode`.
- 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.