include/linux/ext2_fs.h
Source file repositories/reference/linux-study-clean/include/linux/ext2_fs.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/ext2_fs.h- Extension
.h- Size
- 967 bytes
- Lines
- 44
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source 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.
Dependency Surface
linux/types.hlinux/magic.h
Detected Declarations
function Copyright
Annotated Snippet
#ifndef _LINUX_EXT2_FS_H
#define _LINUX_EXT2_FS_H
#include <linux/types.h>
#include <linux/magic.h>
#define EXT2_NAME_LEN 255
/*
* Maximal count of links to a file
*/
#define EXT2_LINK_MAX 32000
#define EXT2_SB_MAGIC_OFFSET 0x38
#define EXT2_SB_BLOCKS_OFFSET 0x04
#define EXT2_SB_BSIZE_OFFSET 0x18
static inline u64 ext2_image_size(void *ext2_sb)
{
__u8 *p = ext2_sb;
if (*(__le16 *)(p + EXT2_SB_MAGIC_OFFSET) != cpu_to_le16(EXT2_SUPER_MAGIC))
return 0;
return (u64)le32_to_cpup((__le32 *)(p + EXT2_SB_BLOCKS_OFFSET)) <<
le32_to_cpup((__le32 *)(p + EXT2_SB_BSIZE_OFFSET));
}
#endif /* _LINUX_EXT2_FS_H */
Annotation
- Immediate include surface: `linux/types.h`, `linux/magic.h`.
- Detected declarations: `function Copyright`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source 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.