fs/ext2/dir.c
Source file repositories/reference/linux-study-clean/fs/ext2/dir.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ext2/dir.c- Extension
.c- Size
- 18916 bytes
- Lines
- 740
- 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.
- 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
ext2.hlinux/buffer_head.hlinux/filelock.hlinux/pagemap.hlinux/swap.hlinux/iversion.h
Detected Declarations
function ext2_rec_len_from_diskfunction ext2_rec_len_to_diskfunction ext2_chunk_sizefunction ext2_last_bytefunction ext2_commit_chunkfunction ext2_check_foliofunction ext2_get_foliofunction ext2_matchfunction ext2_validate_entryfunction ext2_set_de_typefunction ext2_readdirfunction ext2_find_entryfunction folio_release_kmapfunction ext2_inode_by_namefunction ext2_prepare_chunkfunction ext2_handle_dirsyncfunction ext2_set_linkfunction ext2_add_linkfunction ext2_delete_entryfunction ext2_make_emptyfunction emptyfunction ext2_dir_openfunction ext2_dir_releasefunction ext2_dir_llseek
Annotated Snippet
const struct file_operations ext2_dir_operations = {
.open = ext2_dir_open,
.release = ext2_dir_release,
.llseek = ext2_dir_llseek,
.read = generic_read_dir,
.iterate_shared = ext2_readdir,
.unlocked_ioctl = ext2_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ext2_compat_ioctl,
#endif
.fsync = ext2_fsync,
.setlease = generic_setlease,
};
Annotation
- Immediate include surface: `ext2.h`, `linux/buffer_head.h`, `linux/filelock.h`, `linux/pagemap.h`, `linux/swap.h`, `linux/iversion.h`.
- Detected declarations: `function ext2_rec_len_from_disk`, `function ext2_rec_len_to_disk`, `function ext2_chunk_size`, `function ext2_last_byte`, `function ext2_commit_chunk`, `function ext2_check_folio`, `function ext2_get_folio`, `function ext2_match`, `function ext2_validate_entry`, `function ext2_set_de_type`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern implementation candidate.
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.