pub struct WslRecoveryAllocationLock { /* private fields */ }Expand description
Adds the Windows/WSL recovery fence to an ordinary allocation lock, and says on disk when allocations keep being refused.
A Windows watchdog writes its drain request before attempting the same
atomic directory claim. Therefore either this guard owns the directory and
finishes the one launch already in progress, or Windows owns it and no new
launch can pass. A malformed configured fence fails closed. A guest claim
whose owner is provably gone is reclaimed first; see
runner_manager_platform::wsl::fence.
§Refusals that persist are recorded
A refusal is always safe for one pass, and a refusal on every pass is a host
that starts nothing while it looks healthy – 13 days of it, once. So after
launch_health::BLOCKED_AFTER_DEFERRALS consecutive refusals spanning at
least launch_health::BLOCKED_AFTER, with no launch of this process in
progress, the lock writes the state/ record status, service status,
wsl status and host doctor read. The next granted allocation removes it.
Refusals while this process is itself launching are its own contention and
count neither way.