fs/erofs/data.c
Source file repositories/reference/linux-study-clean/fs/erofs/data.c
File Facts
- System
- Linux kernel
- Corpus path
fs/erofs/data.c- Extension
.c- Size
- 14437 bytes
- Lines
- 536
- 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
internal.hlinux/filelock.hlinux/sched/mm.htrace/events/erofs.h
Detected Declarations
struct erofs_iomap_iter_ctxfunction Copyrightfunction erofs_put_metabuffunction inodesfunction erofs_init_metabuffunction erofs_map_blocksfunction erofs_fill_from_devinfofunction erofs_map_devfunction idr_for_each_entryfunction erofs_onlinefolio_initfunction erofs_onlinefolio_splitfunction erofs_onlinefolio_endfunction erofs_iomap_beginfunction erofs_iomap_endfunction erofs_fiemapfunction erofs_read_foliofunction erofs_readaheadfunction erofs_bmapfunction erofs_file_read_iterfunction erofs_dax_huge_faultfunction erofs_dax_faultfunction erofs_file_mmap_preparefunction erofs_file_llseek
Annotated Snippet
const struct file_operations erofs_file_fops = {
.llseek = erofs_file_llseek,
.read_iter = erofs_file_read_iter,
.unlocked_ioctl = erofs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = erofs_compat_ioctl,
#endif
.mmap_prepare = erofs_file_mmap_prepare,
.get_unmapped_area = thp_get_unmapped_area,
.splice_read = filemap_splice_read,
.setlease = generic_setlease,
};
Annotation
- Immediate include surface: `internal.h`, `linux/filelock.h`, `linux/sched/mm.h`, `trace/events/erofs.h`.
- Detected declarations: `struct erofs_iomap_iter_ctx`, `function Copyright`, `function erofs_put_metabuf`, `function inodes`, `function erofs_init_metabuf`, `function erofs_map_blocks`, `function erofs_fill_from_devinfo`, `function erofs_map_dev`, `function idr_for_each_entry`, `function erofs_onlinefolio_init`.
- 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.