fs/affs/file.c
Source file repositories/reference/linux-study-clean/fs/affs/file.c
File Facts
- System
- Linux kernel
- Corpus path
fs/affs/file.c- Extension
.c- Size
- 26393 bytes
- Lines
- 1021
- 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/uio.hlinux/blkdev.hlinux/filelock.hlinux/mpage.haffs.h
Detected Declarations
function affs_file_openfunction affs_file_releasefunction affs_grow_extcachefunction affs_alloc_extblockfunction affs_get_extblockfunction affs_get_extblock_slowfunction affs_get_blockfunction affs_writepagesfunction affs_read_foliofunction affs_write_failedfunction affs_direct_IOfunction affs_write_beginfunction affs_write_endfunction _affs_bmapfunction affs_bread_inofunction affs_getzeroblk_inofunction affs_getemptyblk_inofunction affs_do_read_folio_ofsfunction affs_extent_file_ofsfunction affs_read_folio_ofsfunction affs_write_begin_ofsfunction affs_write_end_ofsfunction affs_free_preallocfunction affs_truncatefunction affs_file_fsync
Annotated Snippet
const struct file_operations affs_file_operations = {
.llseek = generic_file_llseek,
.read_iter = generic_file_read_iter,
.write_iter = generic_file_write_iter,
.mmap_prepare = generic_file_mmap_prepare,
.open = affs_file_open,
.release = affs_file_release,
.fsync = affs_file_fsync,
.splice_read = filemap_splice_read,
.setlease = generic_setlease,
};
const struct inode_operations affs_file_inode_operations = {
.setattr = affs_setattr,
};
Annotation
- Immediate include surface: `linux/uio.h`, `linux/blkdev.h`, `linux/filelock.h`, `linux/mpage.h`, `affs.h`.
- Detected declarations: `function affs_file_open`, `function affs_file_release`, `function affs_grow_extcache`, `function affs_alloc_extblock`, `function affs_get_extblock`, `function affs_get_extblock_slow`, `function affs_get_block`, `function affs_writepages`, `function affs_read_folio`, `function affs_write_failed`.
- 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.