Repository navigation
fsck.erofs reads deflate images back: erofs is built with libdeflate, and mkfs.erofs takes -zlibdeflate - #92
Merged
Conversation
mkfs.erofs writes deflate with erofs-utils' own compressor, and
erofs-utils reads deflate with zlib or libdeflate, which the build had
neither of: `fsck.erofs --extract` on this build's own `-zdeflate` image
exited 1 ("Failed to extract filesystem") while `--version` listed
deflate, so a consumer holding its deflate images to this fsck got a
failure that said nothing of the image.
libdeflate (MIT) is pinned at its release tag and its raw deflate is
compiled in, as its own build compiles it; HAVE_LIBDEFLATE is on for
every target, so the five mkfs.erofs stay one configuration. With it
mkfs.erofs also takes `-zlibdeflate`, erofs-utils' second deflate
compressor. The archives carry libdeflate's notice.
The smoke test now extracts the deflate image too, and its five image
digests are unchanged. Run on darwin-arm64.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: closer-claudio <claudio@farcloser.world>
closer-claudio
enabled auto-merge
November 22, 2026 00:00
Contributor
Author
|
Reviewed at c97789f |
apostasie
approved these changes
Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 Why
mkfs.erofshere writes deflate images with erofs-utils' own compressor, but erofs-utils reads deflate back with zlib or libdeflate, and the build had neither.fsck.erofs --extracton this build's own-zdeflateimage exited 1 ("Failed to extract filesystem"), whilefsck.erofs --versionlisted deflate. A consumer holding its deflate images to thisfsck.erofsgot a failure that said nothing of the image.🛠️ What
pins.yaml: libdeflate 1.26 at its release tag, by digest. MIT (COPYING).erofs/build.sh: compiles libdeflate's raw deflate (utils,deflate_compress,deflate_decompress, the twocpu_features) with its own build's flags,-O2 -std=gnu11 -DNDEBUG, and addscompressor_libdeflateto liberofs.erofs/config.h:HAVE_LIBDEFLATEon every target, so the fivemkfs.erofsstay one configuration. erofs-utils 1.9.4 reads it inlib/decompress.c(the inflater) andlib/compressor.c(a second compressor name)..justfile: fetches it; each archive carriesLICENSE.libdeflate.erofs/smoke.sh: every image is extracted and compared with the tar, the deflate one included.🔀 What a caller sees change
fsck.erofs --extractreads deflate images.mkfs.erofstakes-zlibdeflate.-zdeflateis still erofs-utils' own compressor and writes the same images: the smoke test's five digests are unchanged.🧪 How
On darwin-arm64:
just erofs-testpasses, five digests unchanged, five images extracted identical to the tar.mkfs.erofs -zlibdeflatethenfsck.erofs --extractexits 0. Before, on the v0.4.0 binaries,fsck.erofs --extractof the-zdeflateimage exits 1.The linux and windows builds (libdeflate under MinGW and on x86) were not run locally: the checks on this pull request run them.