fs/ntfs/dir.c
Source file repositories/reference/linux-study-clean/fs/ntfs/dir.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ntfs/dir.c- Extension
.c- Size
- 35922 bytes
- Lines
- 1200
- 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/blkdev.hdir.hmft.hntfs.hindex.hreparse.hlinux/filelock.h
Detected Declarations
struct ntfs_file_privatestruct ntfs_index_rafunction ntfs_lookup_inode_by_namefunction inodefunction comparisonfunction inodefunction comparisonfunction ntfs_lookupfunction ntfs_insert_rbfunction ntfs_ia_blocks_readaheadfunction ntfs_readdirfunction ntfs_check_empty_dirfunction ntfs_dir_openfunction ntfs_dir_releasefunction ntfs_dir_fsync
Annotated Snippet
const struct file_operations ntfs_dir_ops = {
.llseek = generic_file_llseek, /* Seek inside directory. */
.read = generic_read_dir, /* Return -EISDIR. */
.iterate_shared = ntfs_readdir, /* Read directory contents. */
.fsync = ntfs_dir_fsync, /* Sync a directory to disk. */
.open = ntfs_dir_open, /* Open directory. */
.release = ntfs_dir_release,
.unlocked_ioctl = ntfs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ntfs_compat_ioctl,
#endif
.setlease = generic_setlease,
};
Annotation
- Immediate include surface: `linux/blkdev.h`, `dir.h`, `mft.h`, `ntfs.h`, `index.h`, `reparse.h`, `linux/filelock.h`.
- Detected declarations: `struct ntfs_file_private`, `struct ntfs_index_ra`, `function ntfs_lookup_inode_by_name`, `function inode`, `function comparison`, `function inode`, `function comparison`, `function ntfs_lookup`, `function ntfs_insert_rb`, `function ntfs_ia_blocks_readahead`.
- 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.