fs/nfs/file.c
Source file repositories/reference/linux-study-clean/fs/nfs/file.c
File Facts
- System
- Linux kernel
- Corpus path
fs/nfs/file.c- Extension
.c- Size
- 25339 bytes
- Lines
- 969
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- 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
linux/module.hlinux/time.hlinux/kernel.hlinux/errno.hlinux/fcntl.hlinux/stat.hlinux/nfs_fs.hlinux/nfs_mount.hlinux/mm.hlinux/pagemap.hlinux/gfp.hlinux/rmap.hlinux/swap.hlinux/compaction.hlinux/uaccess.hlinux/filelock.hdelegation.hinternal.hiostat.hfscache.hpnfs.hnfstrace.h
Detected Declarations
function nfs_check_flagsfunction nfs_file_openfunction nfs_file_releasefunction nfs_revalidate_inodefunction nfs_file_llseekfunction nfs_file_flushfunction nfs_file_readfunction nfs_file_splice_readfunction nfs_file_mmap_preparefunction nfs_file_fsync_commitfunction nfs_file_fsyncfunction nfs_truncate_last_foliofunction nfs_folio_is_full_writefunction nfs_want_read_modify_writefunction nfs_write_beginfunction nfs_want_read_modify_writefunction nfs_write_endfunction nfs_invalidate_foliofunction nfs_release_foliofunction nfs_check_dirty_writebackfunction nfs_launder_foliofunction nfs_swap_activatefunction nfs_swap_deactivatefunction nfs_vm_page_mkwritefunction folio_wait_private_2_killablefunction nfs_file_writefunction do_getlkfunction do_unlkfunction do_setlkfunction afunction aexport nfs_check_flagsexport nfs_file_releaseexport nfs_file_llseekexport nfs_file_readexport nfs_file_splice_readexport nfs_file_mmap_prepareexport nfs_file_fsyncexport nfs_truncate_last_folioexport nfs_file_writeexport nfs_lockexport nfs_flockexport nfs_file_operations
Annotated Snippet
const struct file_operations nfs_file_operations = {
.llseek = nfs_file_llseek,
.read_iter = nfs_file_read,
.write_iter = nfs_file_write,
.mmap_prepare = nfs_file_mmap_prepare,
.open = nfs_file_open,
.flush = nfs_file_flush,
.release = nfs_file_release,
.fsync = nfs_file_fsync,
.lock = nfs_lock,
.flock = nfs_flock,
.splice_read = nfs_file_splice_read,
.splice_write = iter_file_splice_write,
.check_flags = nfs_check_flags,
.fop_flags = FOP_DONTCACHE,
};
EXPORT_SYMBOL_GPL(nfs_file_operations);
Annotation
- Immediate include surface: `linux/module.h`, `linux/time.h`, `linux/kernel.h`, `linux/errno.h`, `linux/fcntl.h`, `linux/stat.h`, `linux/nfs_fs.h`, `linux/nfs_mount.h`.
- Detected declarations: `function nfs_check_flags`, `function nfs_file_open`, `function nfs_file_release`, `function nfs_revalidate_inode`, `function nfs_file_llseek`, `function nfs_file_flush`, `function nfs_file_read`, `function nfs_file_splice_read`, `function nfs_file_mmap_prepare`, `function nfs_file_fsync_commit`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.