Skip to content

Move standard filesystem mounts to WSLA init startup#14495

Merged
benhillis merged 3 commits intofeature/wsl-for-appsfrom
user/benhill/wslc_mount_cleanup
Mar 23, 2026
Merged

Move standard filesystem mounts to WSLA init startup#14495
benhillis merged 3 commits intofeature/wsl-for-appsfrom
user/benhill/wslc_mount_cleanup

Conversation

@benhillis
Copy link
Member

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.

@benhillis benhillis requested a review from a team as a code owner March 20, 2026 21:42
Copilot AI review requested due to automatic review settings March 20, 2026 21:42
Copy link
Contributor

Copilot AI left a comment

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 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 into Initialize().
  • 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).

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Ben Hillis 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.
@benhillis benhillis force-pushed the user/benhill/wslc_mount_cleanup branch from c1d12fc to 7845f9c Compare March 23, 2026 18:00
@benhillis benhillis merged commit 2db1652 into feature/wsl-for-apps Mar 23, 2026
7 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.

3 participants