Skip to content

kernel: enable CONFIG_OVERLAY_FS_METACOPY for sysbox#38

Merged
kvinwang merged 2 commits intomainfrom
enable-overlay-metacopy
Mar 9, 2026
Merged

kernel: enable CONFIG_OVERLAY_FS_METACOPY for sysbox#38
kvinwang merged 2 commits intomainfrom
enable-overlay-metacopy

Conversation

@kvinwang
Copy link
Copy Markdown
Collaborator

@kvinwang kvinwang commented Mar 7, 2026

Summary

  • enable CONFIG_OVERLAY_FS_METACOPY=y in the sysbox kernel config fragment
  • add --disable-ovfs-on-idmapped-mount to sysbox-mgr.service
  • explicitly switch sysbox away from the unsupported "overlayfs on idmapped mounts" path and onto the chown fallback path

Background

We are no longer pursuing the overlayfs FS_ALLOW_IDMAP kernel patch route.

Current upstream overlayfs still does not support that path, so sysbox must avoid trying to use overlayfs on idmapped mounts. With --disable-ovfs-on-idmapped-mount, sysbox consistently uses its compatibility fallback instead of hitting the broken path.

That fallback is only practical if overlayfs metacopy is enabled. Without CONFIG_OVERLAY_FS_METACOPY=y, sysbox's chown-based UID remapping can trigger full data copies on large images and become prohibitively slow. With metacopy enabled, only metadata is copied, which keeps container startup usable.

Test plan

  • Build kernel with bitbake virtual/kernel
  • Verify CONFIG_OVERLAY_FS_METACOPY=y in kernel config
  • Verify sysbox-mgr starts with --disable-ovfs-on-idmapped-mount
  • Test sysbox container startup with a large image

kvinwang added 2 commits March 7, 2026 14:42
Without metacopy, sysbox's chown-based UID remapping copies full file
contents on overlayfs, which is extremely slow for large container
images. With metacopy enabled, overlayfs copies only metadata during
chown operations.
@kvinwang kvinwang merged commit a674174 into main Mar 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant