Recognise ZTAILPACKING bit in FeatureIncompat#34
Open
katexochen wants to merge 1 commit into
Open
Conversation
The on-disk EROFS_FEATURE_INCOMPAT_ZTAILPACKING bit (0x10) was missing from internal/disk's FeatureIncompat constants and from the FeatureIncompatAll accept list, so any image that sets it was rejected at Open with "unsupported incompatible feature 0x10" -- even when the fields needing ztailpacking semantics weren't touched by the read path. Modern mkfs.erofs enables ztailpacking by default for compressed inodes, so this affected real-world images. Per-inode rejection of the actual inline-pcluster behaviour already happens inside internal/zerofs.ParseHeader (h_advise's INLINE_PCLUSTER bit -> "ztailpacking not supported" with ErrNotImplemented), matching the kernel's policy of accepting known incompat bits at the superblock level and gating real usage where features are actually consumed. Two additional aliases match upstream's shared-bit naming: ComprHead2 shares bit 0x8 with DeviceTable, and Dedupe shares bit 0x20 with Fragments. 48BIT (0x80) and METABOX (0x100) are deliberately not added: they re-shape inode/metadata encoding and silently tolerating them would lead the reader to misinterpret structures. Assisted-by: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: Paul Meyer <katexochen0@gmail.com>
Member
|
In principle, FeatureIncompatAll shouldn’t set any feature that go-erofs doesn’t implement. |
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.
The on-disk EROFS_FEATURE_INCOMPAT_ZTAILPACKING bit (0x10) was missing from internal/disk's FeatureIncompat constants and from the FeatureIncompatAll accept list, so any image that sets it was rejected at Open with "unsupported incompatible feature 0x10" -- even when the fields needing ztailpacking semantics weren't touched by the read path.
Modern mkfs.erofs enables ztailpacking by default for compressed inodes, so this affected real-world images. Per-inode rejection of the actual inline-pcluster behaviour already happens inside internal/zerofs.ParseHeader (h_advise's INLINE_PCLUSTER bit -> "ztailpacking not supported" with ErrNotImplemented), matching the kernel's policy of accepting known incompat bits at the superblock level and gating real usage where features are actually consumed.
Two additional aliases match upstream's shared-bit naming: ComprHead2 shares bit 0x8 with DeviceTable, and Dedupe shares bit 0x20 with Fragments. 48BIT (0x80) and METABOX (0x100) are deliberately not added: they re-shape inode/metadata encoding and silently tolerating them would lead the reader to misinterpret structures.