fs/ext2/ext2.h
Source file repositories/reference/linux-study-clean/fs/ext2/ext2.h
File Facts
- System
- Linux kernel
- Corpus path
fs/ext2/ext2.h- Extension
.h- Size
- 28078 bytes
- Lines
- 817
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/fs.hlinux/ext2_fs.hlinux/blockgroup_lock.hlinux/percpu_counter.hlinux/rbtree.hlinux/mm.hlinux/highmem.h
Detected Declarations
struct ext2_reserve_windowstruct ext2_reserve_window_nodestruct ext2_block_alloc_infostruct mb_cachestruct ext2_sb_infostruct ext2_group_descstruct ext2_inodestruct ext2_super_blockstruct ext2_dir_entrystruct ext2_dir_entry_2struct ext2_mount_optionsstruct ext2_inode_infofunction sb_bgl_lockfunction flagsfunction verify_offsetsfunction ext2_group_first_block_nofunction ext2_group_last_block_no
Annotated Snippet
extern const struct file_operations ext2_dir_operations;
/* file.c */
extern int ext2_fsync(struct file *file, loff_t start, loff_t end,
int datasync);
extern const struct inode_operations ext2_file_inode_operations;
extern const struct file_operations ext2_file_operations;
/* inode.c */
extern void ext2_set_file_ops(struct inode *inode);
extern const struct address_space_operations ext2_aops;
extern const struct iomap_ops ext2_iomap_ops;
/* namei.c */
extern const struct inode_operations ext2_dir_inode_operations;
extern const struct inode_operations ext2_special_inode_operations;
/* symlink.c */
extern const struct inode_operations ext2_fast_symlink_inode_operations;
extern const struct inode_operations ext2_symlink_inode_operations;
static inline ext2_fsblk_t
ext2_group_first_block_no(struct super_block *sb, unsigned long group_no)
{
return group_no * (ext2_fsblk_t)EXT2_BLOCKS_PER_GROUP(sb) +
le32_to_cpu(EXT2_SB(sb)->s_es->s_first_data_block);
}
static inline ext2_fsblk_t
ext2_group_last_block_no(struct super_block *sb, unsigned long group_no)
{
struct ext2_sb_info *sbi = EXT2_SB(sb);
if (group_no == sbi->s_groups_count - 1)
return le32_to_cpu(sbi->s_es->s_blocks_count) - 1;
else
return ext2_group_first_block_no(sb, group_no) +
EXT2_BLOCKS_PER_GROUP(sb) - 1;
}
#define ext2_set_bit __test_and_set_bit_le
#define ext2_clear_bit __test_and_clear_bit_le
#define ext2_test_bit test_bit_le
#define ext2_find_first_zero_bit find_first_zero_bit_le
#define ext2_find_next_zero_bit find_next_zero_bit_le
Annotation
- Immediate include surface: `linux/fs.h`, `linux/ext2_fs.h`, `linux/blockgroup_lock.h`, `linux/percpu_counter.h`, `linux/rbtree.h`, `linux/mm.h`, `linux/highmem.h`.
- Detected declarations: `struct ext2_reserve_window`, `struct ext2_reserve_window_node`, `struct ext2_block_alloc_info`, `struct mb_cache`, `struct ext2_sb_info`, `struct ext2_group_desc`, `struct ext2_inode`, `struct ext2_super_block`, `struct ext2_dir_entry`, `struct ext2_dir_entry_2`.
- 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.