Move standard filesystem mounts to WSLA init startup#14495
Merged
benhillis merged 3 commits intofeature/wsl-for-appsfrom Mar 23, 2026
Merged
Move standard filesystem mounts to WSLA init startup#14495benhillis merged 3 commits intofeature/wsl-for-appsfrom
benhillis merged 3 commits intofeature/wsl-for-appsfrom
Conversation
benhillis
commented
Mar 20, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves “standard” guest filesystem mounts (devtmpfs/proc/sysfs/devpts/cgroup2) from the Windows-side WSLA session initialization into the Linux WSLA init entrypoint, and simplifies the Windows-side mount flow by inlining the remaining VHD-dependent mounts (root overlay + kernel modules) into WSLAVirtualMachine::Initialize().
Changes:
- Remove
WSLAVirtualMachine::ConfigureInitialMounts()and inline VHD-related mounts intoInitialize(). - Add early “initial mounts” in
WSLAEntryPoint()for devtmpfs, proc, sysfs, devpts, and cgroup2. - Update WSLA init startup comments/structure to reflect the new mount responsibilities.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/windows/wslasession/WSLAVirtualMachine.h | Removes the ConfigureInitialMounts() declaration. |
| src/windows/wslasession/WSLAVirtualMachine.cpp | Inlines root/modules VHD mounts into Initialize() and deletes ConfigureInitialMounts() implementation. |
| src/linux/init/WSLAInit.cpp | Adds early “initial mounts” to WSLA init startup (devtmpfs/proc/sysfs/devpts/cgroup2). |
added 3 commits
March 23, 2026 09:05
Move devtmpfs, proc, sysfs, devpts, and cgroup2 mounts from the Windows-side ConfigureInitialMounts() to WSLAEntryPoint() in the Linux init daemon. These mounts don't depend on host communication and can be performed earlier during init startup. Inline the remaining VHD-dependent mounts (root overlay and kernel modules) directly into Initialize() and remove the now-unnecessary ConfigureInitialMounts method.
c1d12fc to
7845f9c
Compare
OneBlue
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move devtmpfs, proc, sysfs, devpts, and cgroup2 mounts from the Windows-side ConfigureInitialMounts() to WSLAEntryPoint() in the Linux init daemon. These mounts don't depend on host communication and can be performed earlier during init startup.
Inline the remaining VHD-dependent mounts (root overlay and kernel modules) directly into Initialize() and remove the now-unnecessary ConfigureInitialMounts method.