fs/f2fs/dir.c
Source file repositories/reference/linux-study-clean/fs/f2fs/dir.c
File Facts
- System
- Linux kernel
- Corpus path
fs/f2fs/dir.c- Extension
.c- Size
- 28346 bytes
- Lines
- 1142
- 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
linux/unaligned.hlinux/fs.hlinux/f2fs_fs.hlinux/filelock.hlinux/sched/signal.hlinux/unicode.hf2fs.hnode.hacl.hxattr.htrace/events/f2fs.h
Detected Declarations
function Copyrightfunction dir_blocksfunction dir_bucketsfunction bucket_blocksfunction f2fs_init_casefolded_namefunction f2fs_free_casefolded_namefunction __f2fs_setup_filenamefunction fscrypt_setup_filenamefunction fscrypt_prepare_lookupfunction f2fs_free_filenamefunction dir_block_indexfunction f2fs_match_namefunction IS_CASEFOLDEDfunction foundfunction f2fs_inode_by_namefunction f2fs_set_linkfunction init_dent_inodefunction f2fs_do_make_empty_dirfunction make_empty_dirfunction f2fs_update_parent_metadatafunction f2fs_room_for_filenamefunction f2fs_has_enough_roomfunction f2fs_update_dentryfunction f2fs_add_regular_entryfunction f2fs_add_dentryfunction f2fs_lock_opfunction f2fs_do_tmpfilefunction f2fs_drop_nlinkfunction f2fs_delete_entryfunction f2fs_empty_dirfunction f2fs_fill_dentriesfunction f2fs_readdir
Annotated Snippet
const struct file_operations f2fs_dir_operations = {
.llseek = generic_file_llseek,
.read = generic_read_dir,
.iterate_shared = f2fs_readdir,
.fsync = f2fs_sync_file,
.unlocked_ioctl = f2fs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = f2fs_compat_ioctl,
#endif
.setlease = generic_setlease,
};
Annotation
- Immediate include surface: `linux/unaligned.h`, `linux/fs.h`, `linux/f2fs_fs.h`, `linux/filelock.h`, `linux/sched/signal.h`, `linux/unicode.h`, `f2fs.h`, `node.h`.
- Detected declarations: `function Copyright`, `function dir_blocks`, `function dir_buckets`, `function bucket_blocks`, `function f2fs_init_casefolded_name`, `function f2fs_free_casefolded_name`, `function __f2fs_setup_filename`, `function fscrypt_setup_filename`, `function fscrypt_prepare_lookup`, `function f2fs_free_filename`.
- 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.