Commit b26d87b
feat: add fragment table, file dedup, xattrs, and CloneInode
Fragment table: file tails smaller than blockSize are packed into shared
fragment blocks, significantly reducing image size for many small files.
Fragment table written as compressed metadata with indirect pointer table.
File deduplication: CloneInode(newPath, existingPath) creates entries that
share underlying data for any inode type. AddFS auto-detects hard links
via dev+ino on Unix platforms. Cloned files promoted to XFileType.
Extended attributes: SetXattr(path, name, value) API for programmatic
use. AddFS reads xattrs via XattrFS interface or platform syscalls.
Xattr table serialized per squashfs spec with k-v metadata, ID table,
and header. Inodes with xattrs auto-promoted to extended types.
Also: directory entry type field now uses Basic() for extended types,
all extended inode types (XFile, XSymlink, XDev, XFifo, XSocket)
serialized in writeInode, XDirType xattrIdx no longer hardcoded.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent e321aa2 commit b26d87b
9 files changed
Lines changed: 867 additions & 57 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
| 197 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments