Repository navigation
erofs: enable fsview fallback for unsupported features - #14077
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes EROFS fsview behavior so that when the userspace EROFS reader (go-erofs) reports an unsupported filesystem feature via its ErrNotImplemented sentinel, containerd correctly classifies the failure as errdefs.ErrNotImplemented and triggers the existing read-only kernel-mount fallback in pkg/oci.withReadonlyFS.
Changes:
- Translate go-erofs
ErrNotImplementedat the EROFS fsview adapter boundary into a containerderrdefs.ErrNotImplemented-matching error while preserving the original error in the chain. - Add a regression test that constructs a minimal EROFS image advertising incompatible compression feature
0x2and asserts both sentinels match.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/mount/fsview/erofs/erofs.go | Wrap go-erofs ErrNotImplemented so withReadonlyFS recognizes it as containerd ErrNotImplemented and falls back to kernel mount. |
| plugins/mount/fsview/erofs/erofs_test.go | Add regression coverage for unsupported compression feature classification and error-chain behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Robert Cronin <[email protected]>
robert-cronin
force-pushed
the
fix/erofs-compressed-fallback
branch
from
September 1, 2026 03:37
2b5851b to
9d804de
Compare
hsiangkao
approved these changes
Sep 1, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 2, 2026
This was referenced Sep 15, 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.
Fixes #14076
go-erofsreturns its ownErrNotImplementedsentinel when its userspace reader cannot open a compressed EROFS filesystem. The EROFS fsview adapter previously returned that error unchanged, sowithReadonlyFSdid not recognize the operation as unsupported and returned before reaching the existing read-only kernel-mount fallback.Translate only errors matching
go-erofs.ErrNotImplementedat the adapter boundary while preserving the original error and diagnostic in the chain. Other parser, superblock, path, device, and I/O errors remain unchanged.Add a focused regression test that constructs a minimal parser-valid EROFS image with incompatible compression feature
0x2and verifies that the returned error matches both the go-erofs and containerdErrNotImplementedsentinels.Testing
go test ./plugins/mount/fsview/erofs -run '^TestHandleMountUnsupportedCompression$' -count=1go test ./plugins/mount/fsview/erofs ./internal/fsview ./pkg/oci -count=1git diff --check HEAD^ HEADThe original runtime failure is reproduced in #14076. I did not rerun the privileged Kubernetes reproduction against this patched build because the local host does not have
mkfs.erofsor kernel EROFS support; the regression test verifies the error classification that enables the existing fallback.