Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map current user to root in subuid user namespace #3156

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

DaanDeMeyer
Copy link
Contributor

By mapping the current user to root in the subuid user namespace,
we don't have to change the ownership of all the files in the directory
tree to root in the subuid uid/gid range. This means that on btrfs
filesystems, we can do a subvolume snapshot instead of an expensive
full tree recursion to copy each file individually.

Copy link
Contributor

@septatrix septatrix left a comment

Choose a reason for hiding this comment

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

Boot time to init went down from ~6s to ~3s for the default Arch mkosi-kernel image (~2.2G, ~71k files) in some rudimentary testing

@behrmann
Copy link
Contributor

I looked at the fedora:fedora and centos:arch CI and the directory output fails at firstboot during boot.

@DaanDeMeyer DaanDeMeyer force-pushed the subuid branch 3 times, most recently from 38aa24f to 2a5cf2c Compare October 31, 2024 18:11
By mapping the current user to root in the subuid user namespace,
we don't have to change the ownership of all the files in the directory
tree to root in the subuid uid/gid range. This means that on btrfs
filesystems, we can do a subvolume snapshot instead of an expensive
full tree recursion to copy each file individually.
@DaanDeMeyer DaanDeMeyer merged commit 2be2503 into systemd:main Oct 31, 2024
34 of 36 checks passed
@DaanDeMeyer DaanDeMeyer deleted the subuid branch October 31, 2024 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants