Before we supported pivot_root() nspawn used to make the rootfs shared before setting up the mount tunnel. So it was safe for it to just turn it into a dependent mount during setup. However, we cannot do this anymore because of the requirements pivot_root() has. After the pivot_root() we will make the rootfs shared recursively. If we turned the mount tunnel into dependent mount before mount_switch_root() this will have the consequence that it becomes a shared mount within the same peer group as the rootfs. So no mounts will propagate into the container from the host anymore. To fix this we split setting up the mount tunnel and making it active into two steps. Setting up the mount tunnel is performed before mount_switch_root() and activating it afterwards. Note that this works because turning a shared mount into a shared mount is a nop. IOW, no new peer group will be allocated. Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list or join our IRC channel.
Stable branches with backported patches are available in the stable repo.
