Expand description
Source-side snapshot types for the HFS+ reformat-and-copy pipeline.
Step 10 of docs/hfsplus_enhancements.md. Parallel to hfs_clone.rs,
but for HFS+/HFSX. Nothing here mutates the source volume; these structs
capture every byte of metadata that must survive a clone-shrink so later
steps can replay it onto a freshly-formatted target.
Step 14 wired extended-attribute capture into both SourceFileSnapshot
and SourceDirSnapshot. Step 17 added file-hardlink support: stubs
routed into a separate SourceHardlinkSnapshot list and inodes
(files under \0\0\0\0HFS+ Private Data named iNode<N>) flagged
with is_inode = true. Step 18 (this revision) does the same for
directory hardlinks: file rows with FInfo fdrp/MACS route into
SourceDirHardlinkSnapshot, and folders under
.HFS+ Private Directory Data\r named dir_<N> are flagged with
is_dir_inode = true. Replay (Step 21) emits each directory inode
once and points each link at it.
Structs§
- HfsPlus
Clone Report - Outcome of
clone_hfsplus_volume. Counts mirror the source side; any non-fatal per-entry skips end up inskippedrather than the result. - Source
Catalog Snapshot - Full capture of a source HFS+/HFSX volume: volume metadata plus every directory and file record. Catalog thread records are not captured — the target writer recreates them from scratch.
- Source
DirHardlink Snapshot - One directory-hardlink stub captured from the source catalog. The stub
is encoded as a FILE record on disk; replay re-emits it the same way
(FInfo
fdrp/MACSplusbsdInfo.special = inode_num). - Source
DirSnapshot - Per-directory metadata captured from a
kHFSPlusFolderRecord. - Source
File Snapshot - Per-file metadata captured from a
kHFSPlusFileRecord. - Source
Hardlink Snapshot - One file-hardlink stub captured from the source catalog. Replay creates
inode_countinodes once and N stub rows pointing at them. - Source
Volume Snapshot - Volume-level metadata captured from the source.
Functions§
- clone_
hfsplus_ volume - BFS-replay every directory, file, hardlink, and xattr from
sourceontotarget. Step 21 ofdocs/hfsplus_enhancements.md.