fs/ubifs/file.c
Source file repositories/reference/linux-study-clean/fs/ubifs/file.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ubifs/file.c- Extension
.c- Size
- 48450 bytes
- Lines
- 1667
- 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
ubifs.hlinux/mount.hlinux/slab.hlinux/migrate.h
Detected Declarations
function Copyrightfunction do_readpagefunction release_new_page_budgetfunction release_existing_page_budgetfunction write_begin_slowfunction allocate_budgetfunction ubifs_write_beginfunction cancel_budgetfunction ubifs_write_endfunction populate_pagefunction ubifs_do_bulk_readfunction ubifs_bulk_readfunction ubifs_read_foliofunction do_writepagefunction XXXfunction ubifs_writepagesfunction do_attr_changesfunction do_truncationfunction do_setattrfunction ubifs_setattrfunction ubifs_invalidate_foliofunction ubifs_fsyncfunction mctime_update_neededfunction ubifs_update_timefunction update_mctimefunction ubifs_write_iterfunction ubifs_dirty_foliofunction ubifs_release_foliofunction mmapfunction folio_posfunction ubifs_file_mmap_preparefunction ubifs_symlink_getattr
Annotated Snippet
const struct file_operations ubifs_file_operations = {
.llseek = generic_file_llseek,
.read_iter = generic_file_read_iter,
.write_iter = ubifs_write_iter,
.mmap_prepare = ubifs_file_mmap_prepare,
.fsync = ubifs_fsync,
.unlocked_ioctl = ubifs_ioctl,
.splice_read = filemap_splice_read,
.splice_write = iter_file_splice_write,
.open = fscrypt_file_open,
#ifdef CONFIG_COMPAT
.compat_ioctl = ubifs_compat_ioctl,
#endif
};
Annotation
- Immediate include surface: `ubifs.h`, `linux/mount.h`, `linux/slab.h`, `linux/migrate.h`.
- Detected declarations: `function Copyright`, `function do_readpage`, `function release_new_page_budget`, `function release_existing_page_budget`, `function write_begin_slow`, `function allocate_budget`, `function ubifs_write_begin`, `function cancel_budget`, `function ubifs_write_end`, `function populate_page`.
- 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.