Skip to content

erofs: align default mkfs block size across platforms#13624

Merged
dmcgowan merged 1 commit into
containerd:mainfrom
chris-crone:mkfs-erofs-4k
Jun 18, 2026
Merged

erofs: align default mkfs block size across platforms#13624
dmcgowan merged 1 commit into
containerd:mainfrom
chris-crone:mkfs-erofs-4k

Conversation

@chris-crone

Copy link
Copy Markdown
Contributor

Force a 4K block size on all platforms rather than only on darwin. An explicit caller-supplied -b is still respected.

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 standardizes mkfs.erofs invocation so that, unless the caller explicitly provides a -b... option, EROFS images are created with a 4K block size on all platforms to improve cross-platform mount compatibility (e.g., across differing host page sizes).

Changes:

  • Remove the darwin-only gating so the default EROFS block size logic applies on all platforms.
  • Keep respecting caller-supplied -b options while defaulting to -b4096 when absent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Force a 4K block size on all platforms rather than only on darwin.
An explicit caller-supplied -b is still respected.

Signed-off-by: Chris Crone <[email protected]>

@hsiangkao hsiangkao 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.

hi @chris-crone , looks good to me, but if we consider virtio-pmem passthough images into guests later, it needs strict page_size == block_size in order to enable dax and mmap dax pages (but yes, anyway, we could reconsider the strategy later).

also I will support large block size feature on the kernel side (already on my todo list), so that 16k block size can be mountable on 4k page guest kernels as well.

@chris-crone

Copy link
Copy Markdown
Contributor Author

hi @chris-crone , looks good to me, but if we consider virtio-pmem passthough images into guests later, it needs strict page_size == block_size in order to enable dax and mmap dax pages (but yes, anyway, we could reconsider the strategy later).

also I will support large block size feature on the kernel side (already on my todo list), so that 16k block size can be mountable on 4k page guest kernels as well.

Thanks for the quick review @hsiangkao!

Yes, we'll need to iterate on this as we add more functionality. Happy to help with that where needed.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jun 18, 2026
@dmcgowan
dmcgowan enabled auto-merge June 18, 2026 19:22
@dmcgowan
dmcgowan added this pull request to the merge queue Jun 18, 2026
Merged via the queue into containerd:main with commit bfc75a4 Jun 18, 2026
86 of 88 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jun 18, 2026
@dmcgowan dmcgowan added the cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch label Jun 18, 2026
@dmcgowan

Copy link
Copy Markdown
Member

/cherry-pick release/2.3

@k8s-infra-cherrypick-robot

Copy link
Copy Markdown

@dmcgowan: new pull request created: #13632

Details

In response to this:

/cherry-pick release/2.3

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-picked/2.3.x PR commits are cherry picked into release/2.3 branch size/XS

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants