fs/hpfs/hpfs.h
Source file repositories/reference/linux-study-clean/fs/hpfs/hpfs.h
File Facts
- System
- Linux kernel
- Corpus path
fs/hpfs/hpfs.h- Extension
.h- Size
- 18993 bytes
- Lines
- 580
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
struct hpfs_boot_blockstruct hpfs_super_blockstruct hpfs_spare_blockstruct code_page_directorystruct code_page_datastruct dnodestruct hpfs_direntstruct bplus_leaf_nodestruct bplus_internal_nodestruct bplus_headerstruct fnodestruct anodestruct extended_attributefunction bp_internalfunction bp_fnode_parentfunction fnode_in_anodefunction fnode_is_dirfunction ea_indirectfunction ea_in_anode
Annotated Snippet
struct dnode {
__le32 magic; /* 77e4 0aae */
__le32 first_free; /* offset from start of dnode to
first free dir entry */
#ifdef __LITTLE_ENDIAN
u8 root_dnode: 1; /* Is it root dnode? */
u8 increment_me: 7; /* some kind of activity counter? */
/* Neither HPFS.IFS nor CHKDSK cares
if you change this word */
#else
u8 increment_me: 7; /* some kind of activity counter? */
/* Neither HPFS.IFS nor CHKDSK cares
if you change this word */
u8 root_dnode: 1; /* Is it root dnode? */
#endif
u8 increment_me2[3];
__le32 up; /* (root dnode) directory's fnode
(nonroot) parent dnode */
__le32 self; /* pointer to this dnode */
u8 dirent[2028]; /* one or more dirents */
};
struct hpfs_dirent {
__le16 length; /* offset to next dirent */
#ifdef __LITTLE_ENDIAN
u8 first: 1; /* set on phony ^A^A (".") entry */
u8 has_acl: 1;
u8 down: 1; /* down pointer present (after name) */
u8 last: 1; /* set on phony \377 entry */
u8 has_ea: 1; /* entry has EA */
u8 has_xtd_perm: 1; /* has extended perm list (???) */
u8 has_explicit_acl: 1;
u8 has_needea: 1; /* ?? some EA has NEEDEA set
I have no idea why this is
interesting in a dir entry */
#else
u8 has_needea: 1; /* ?? some EA has NEEDEA set
I have no idea why this is
interesting in a dir entry */
u8 has_explicit_acl: 1;
u8 has_xtd_perm: 1; /* has extended perm list (???) */
u8 has_ea: 1; /* entry has EA */
u8 last: 1; /* set on phony \377 entry */
u8 down: 1; /* down pointer present (after name) */
u8 has_acl: 1;
u8 first: 1; /* set on phony ^A^A (".") entry */
#endif
#ifdef __LITTLE_ENDIAN
u8 read_only: 1; /* dos attrib */
u8 hidden: 1; /* dos attrib */
u8 system: 1; /* dos attrib */
u8 flag11: 1; /* would be volume label dos attrib */
u8 directory: 1; /* dos attrib */
u8 archive: 1; /* dos attrib */
u8 not_8x3: 1; /* name is not 8.3 */
u8 flag15: 1;
#else
u8 flag15: 1;
u8 not_8x3: 1; /* name is not 8.3 */
u8 archive: 1; /* dos attrib */
u8 directory: 1; /* dos attrib */
u8 flag11: 1; /* would be volume label dos attrib */
u8 system: 1; /* dos attrib */
u8 hidden: 1; /* dos attrib */
u8 read_only: 1; /* dos attrib */
#endif
__le32 fnode; /* fnode giving allocation info */
__le32 write_date; /* mtime */
__le32 file_size; /* file length, bytes */
__le32 read_date; /* atime */
__le32 creation_date; /* ctime */
__le32 ea_size; /* total EA length, bytes */
u8 no_of_acls; /* number of ACL's (low 3 bits) */
u8 ix; /* code page index (of filename), see
struct code_page_data */
u8 namelen; /* file name length */
u8 name[]; /* file name */
/* dnode_secno down; btree down pointer, if present,
follows name on next word boundary, or maybe it
precedes next dirent, which is on a word boundary. */
};
/* B+ tree: allocation info in fnodes and anodes */
/* dnodes point to fnodes which are responsible for listing the sectors
assigned to the file. This is done with trees of (length,address)
Annotation
- Detected declarations: `struct hpfs_boot_block`, `struct hpfs_super_block`, `struct hpfs_spare_block`, `struct code_page_directory`, `struct code_page_data`, `struct dnode`, `struct hpfs_dirent`, `struct bplus_leaf_node`, `struct bplus_internal_node`, `struct bplus_header`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- 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.