You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(create) two-phase analytic builder — FsSizePlan via FilesystemFactory, AFFS reference
(create) writer-determined exact sizing for all block filesystems
(create) exact content-fit sizing infra + FAT32 (FsSizePlan)
Fixed
(hfs+) fsck-clean create at any size (alt-VH alignment + bitmap padding)
Other
(analyze) drop the binary-search writer_required_size fallback
(hfs+) drop unresolved intra-doc link to trait method total_size
Fixed
(hfs+)create -t hfsplus now produces fsck.hfsplus-clean volumes at any size, not only block-aligned ones. Two pre-existing writer bugs:
(1) the image could be a non-multiple of the 4 KiB allocation block (the 2× + 64 MiB auto-size, or an arbitrary --size), leaving a trailing
partial block past the alternate volume header where fsck reads a
misplaced header — HfsPlus now reports image_len, so the create/repack
paths truncate the output to a whole number of allocation blocks; (2) when
the bitmap's last byte was partial, its padding bits were written as 1,
but TN1150 requires bits beyond total_blocks to read as 0 — they're now
cleared on disk (the in-memory allocator still keeps them set). Verified fsck.hfsplus-clean across previously-failing block counts and 500/5000-file
trees.
Added
(create)content-fit sizing, exact per filesystem.fstool create <fs> <source-dir> without --size now computes the minimal image that
holds the content, instead of a 2× + 64 MiB over-provision (or, for FAT32,
requiring --size). A new FsSizePlan trait (mirroring ext's BuildPlan)
lets each filesystem accumulate the exact on-disk allocation from the single
analysis walk and return the smallest image its writer accepts, rounded only
to that filesystem's native unit. FAT32 is the first wired up: it
searches the authoritative Fat32::geometry, so e.g. 250 MiB of content
produces a ~254 MiB image (≈1 % overhead, all but one cluster used) and a
source-backed create -t fat32 no longer needs --size.
(create)the writer now determines its own size for every block
filesystem (hfs+, hfs, affs, xfs, ntfs, f2fs). Rather than a parallel size
model that could drift, create <fs> <dir> (no --size) does a dry-run:
it formats and populates the real writer against a sparse, write-discarding SizingDevice — assigning inodes/CNIDs, encoding names, building B-trees and
directory blocks exactly as for a real build, with file data written as
zeros so the probe is metadata-only — and binary-searches the smallest size
the writer's own allocator accepts. Result: tight, fsck-clean images
(hfs +0 %, affs +1 %, hfs+ +3 %, xfs +13 %; ntfs and f2fs report their
writers' genuine minimums) versus the former 2× + 64 MiB. Compressing /
archive backends (squashfs, iso, grf, …) keep their grow-then-truncate path.
The probe tolerates writers that panic on degenerate small sizes (caught
and treated as "doesn't fit"), e.g. a pre-existing f2fs format panic.