include/linux/hfs_common.h
Source file repositories/reference/linux-study-clean/include/linux/hfs_common.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/hfs_common.h- Extension
.h- Size
- 19249 bytes
- Lines
- 664
- 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.
- 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 hfs_namestruct hfsplus_unistrstruct hfsplus_attr_unistrstruct hfs_extentstruct hfsplus_extentstruct hfsplus_fork_rawstruct hfs_mdbstruct hfsplus_vhstruct hfs_pointstruct hfs_rectstruct hfs_finfostruct hfs_fxinfostruct hfs_dinfostruct hfs_dxinfostruct hfs_cat_keystruct hfsplus_cat_keystruct hfs_ext_keystruct hfsplus_ext_keystruct hfs_cat_filestruct hfs_cat_dirstruct hfs_cat_threadstruct hfsplus_permstruct hfs_bnode_descstruct hfs_btree_header_recstruct hfsplus_cat_folderstruct hfsplus_cat_filestruct hfsplus_cat_threadstruct hfsplus_attr_keystruct hfsplus_attr_fork_datastruct hfsplus_attr_extentsstruct hfsplus_attr_inline_data
Annotated Snippet
struct hfs_name {
u8 len;
u8 name[HFS_NAMELEN];
} __packed;
/* A "string" as used in filenames, etc. */
struct hfsplus_unistr {
__be16 length;
hfsplus_unichr unicode[HFSPLUS_MAX_STRLEN];
} __packed;
/*
* A "string" is used in attributes file
* for name of extended attribute
*/
struct hfsplus_attr_unistr {
__be16 length;
hfsplus_unichr unicode[HFSPLUS_ATTR_MAX_STRLEN];
} __packed;
enum {
HFS_REGULAR_NAME,
HFS_XATTR_NAME,
};
struct hfs_extent {
__be16 block;
__be16 count;
};
typedef struct hfs_extent hfs_extent_rec[3];
/* A single contiguous area of a file */
struct hfsplus_extent {
__be32 start_block;
__be32 block_count;
} __packed;
typedef struct hfsplus_extent hfsplus_extent_rec[8];
/* Information for a "Fork" in a file */
struct hfsplus_fork_raw {
__be64 total_size;
__be32 clump_size;
__be32 total_blocks;
hfsplus_extent_rec extents;
} __packed;
struct hfs_mdb {
__be16 drSigWord; /* Signature word indicating fs type */
__be32 drCrDate; /* fs creation date/time */
__be32 drLsMod; /* fs modification date/time */
__be16 drAtrb; /* fs attributes */
__be16 drNmFls; /* number of files in root directory */
__be16 drVBMSt; /* location (in 512-byte blocks)
of the volume bitmap */
__be16 drAllocPtr; /* location (in allocation blocks)
to begin next allocation search */
__be16 drNmAlBlks; /* number of allocation blocks */
__be32 drAlBlkSiz; /* bytes in an allocation block */
__be32 drClpSiz; /* clumpsize, the number of bytes to
allocate when extending a file */
__be16 drAlBlSt; /* location (in 512-byte blocks)
of the first allocation block */
__be32 drNxtCNID; /* CNID to assign to the next
file or directory created */
__be16 drFreeBks; /* number of free allocation blocks */
u8 drVN[28]; /* the volume label */
__be32 drVolBkUp; /* fs backup date/time */
__be16 drVSeqNum; /* backup sequence number */
__be32 drWrCnt; /* fs write count */
__be32 drXTClpSiz; /* clumpsize for the extents B-tree */
__be32 drCTClpSiz; /* clumpsize for the catalog B-tree */
__be16 drNmRtDirs; /* number of directories in
the root directory */
__be32 drFilCnt; /* number of files in the fs */
__be32 drDirCnt; /* number of directories in the fs */
u8 drFndrInfo[32]; /* data used by the Finder */
__be16 drEmbedSigWord; /* embedded volume signature */
__be32 drEmbedExtent; /* starting block number (xdrStABN)
and number of allocation blocks
(xdrNumABlks) occupied by embedded
volume */
__be32 drXTFlSize; /* bytes in the extents B-tree */
hfs_extent_rec drXTExtRec; /* extents B-tree's first 3 extents */
__be32 drCTFlSize; /* bytes in the catalog B-tree */
hfs_extent_rec drCTExtRec; /* catalog B-tree's first 3 extents */
} __packed;
/* HFS+ Volume Header */
struct hfsplus_vh {
__be16 signature;
Annotation
- Detected declarations: `struct hfs_name`, `struct hfsplus_unistr`, `struct hfsplus_attr_unistr`, `struct hfs_extent`, `struct hfsplus_extent`, `struct hfsplus_fork_raw`, `struct hfs_mdb`, `struct hfsplus_vh`, `struct hfs_point`, `struct hfs_rect`.
- 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.