fs/ecryptfs/file.c
Source file repositories/reference/linux-study-clean/fs/ecryptfs/file.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ecryptfs/file.c- Extension
.c- Size
- 12245 bytes
- Lines
- 443
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/file.hlinux/poll.hlinux/slab.hlinux/mount.hlinux/pagemap.hlinux/security.hlinux/compat.hlinux/fs_stack.hecryptfs_kernel.h
Detected Declarations
struct ecryptfs_getdents_callbackfunction Copyrightfunction ecryptfs_splice_read_update_atimefunction ecryptfs_filldirfunction ecryptfs_readdirfunction read_or_initialize_metadatafunction ecryptfs_mmapfunction ecryptfs_openfunction ecryptfs_dir_openfunction ecryptfs_flushfunction ecryptfs_releasefunction ecryptfs_dir_releasefunction ecryptfs_dir_llseekfunction ecryptfs_fsyncfunction ecryptfs_fasyncfunction ecryptfs_unlocked_ioctlfunction ecryptfs_compat_ioctl
Annotated Snippet
const struct file_operations ecryptfs_dir_fops = {
.iterate_shared = ecryptfs_readdir,
.read = generic_read_dir,
.unlocked_ioctl = ecryptfs_unlocked_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ecryptfs_compat_ioctl,
#endif
.open = ecryptfs_dir_open,
.release = ecryptfs_dir_release,
.fsync = ecryptfs_fsync,
.llseek = ecryptfs_dir_llseek,
};
const struct file_operations ecryptfs_main_fops = {
.llseek = generic_file_llseek,
.read_iter = ecryptfs_read_update_atime,
.write_iter = generic_file_write_iter,
.unlocked_ioctl = ecryptfs_unlocked_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ecryptfs_compat_ioctl,
#endif
.mmap = ecryptfs_mmap,
.open = ecryptfs_open,
.flush = ecryptfs_flush,
.release = ecryptfs_release,
.fsync = ecryptfs_fsync,
.fasync = ecryptfs_fasync,
.splice_read = ecryptfs_splice_read_update_atime,
};
Annotation
- Immediate include surface: `linux/file.h`, `linux/poll.h`, `linux/slab.h`, `linux/mount.h`, `linux/pagemap.h`, `linux/security.h`, `linux/compat.h`, `linux/fs_stack.h`.
- Detected declarations: `struct ecryptfs_getdents_callback`, `function Copyright`, `function ecryptfs_splice_read_update_atime`, `function ecryptfs_filldir`, `function ecryptfs_readdir`, `function read_or_initialize_metadata`, `function ecryptfs_mmap`, `function ecryptfs_open`, `function ecryptfs_dir_open`, `function ecryptfs_flush`.
- 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.