Skip to content

erofs: enable fsview fallback for unsupported features - #14077

Merged
mxpv merged 1 commit into
containerd:mainfrom
robert-cronin:fix/erofs-compressed-fallback
Sep 2, 2026
Merged

mxpv merged 1 commit into
containerd:mainfrom
robert-cronin:fix/erofs-compressed-fallback

Conversation

@robert-cronin

@robert-cronin robert-cronin commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #14076

go-erofs returns its own ErrNotImplemented sentinel when its userspace reader cannot open a compressed EROFS filesystem. The EROFS fsview adapter previously returned that error unchanged, so withReadonlyFS did not recognize the operation as unsupported and returned before reaching the existing read-only kernel-mount fallback.

Translate only errors matching go-erofs.ErrNotImplemented at 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 0x2 and verifies that the returned error matches both the go-erofs and containerd ErrNotImplemented sentinels.

Testing

  • go test ./plugins/mount/fsview/erofs -run '^TestHandleMountUnsupportedCompression$' -count=1
  • go test ./plugins/mount/fsview/erofs ./internal/fsview ./pkg/oci -count=1
  • git diff --check HEAD^ HEAD

The 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.erofs or kernel EROFS support; the regression test verifies the error classification that enables the existing fallback.

Fix fsview fallback to kernel mount for compressed EROFS filesystems

Copilot AI lite review requested due to automatic review settings September 1, 2026 03:25
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Sep 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ErrNotImplemented at the EROFS fsview adapter boundary into a containerd errdefs.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 0x2 and 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.

@djdongjin djdongjin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Sep 1, 2026
@mxpv
mxpv added this pull request to the merge queue Sep 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 2, 2026
@mxpv
mxpv added this pull request to the merge queue Sep 2, 2026
Merged via the queue into containerd:main with commit 282a4b9 Sep 2, 2026
96 of 98 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

erofs fsview does not fall back to a kernel mount for unsupported compression

6 participants