VFS: route MAXIMUM_ALLOWED opens through the overlay #2694
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2694
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2694"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@luckyteagirl on GitHub · 2026-11-26 06:42 UTC · original
luckyteagirl:codex/vfs-maximum-allowed-overlay→main· +16 −0 · 1 files · 1 commits · openFixes #2682. A title can request
MAXIMUM_ALLOWEDwithout an explicit write bit. The old VFS classifier sent that open to the original game file even though Windows can grant write access. This change sends the request through the copy-on-write overlay.What is in it
MAXIMUM_ALLOWEDin the VFS write-capable access mask.Tested
30.0.13002.13003); AMD Ryzen 9 5980HX; Rust 1.99.0 MSVC.mainby selecting the original and passed onc4d013199b705fcc6dcff070e2dd687834af0ada. All 13 VFS module tests passed on the committed head (0 failed, 0 ignored, 0 skipped) withXCL_ADAPTER=6800M,XCL_REQUIRE_GPU=1, and one test thread. These VFS tests run on the CPU.CreateFileWprobe confirmed thatMAXIMUM_ALLOWEDcan grant a writable handle when the ACL allows it.cargo build --locked --release -p xcl -j 1passed on both cleanmainand the committed head.scripts/test.ps1completed the workspace and test-binary builds but the library harness exited with0xc0000005during the DXIL tests, before a full-suite summary. Its log shows 83okand oneignoredprogress lines before the abort; these are not complete suite counts.XCL_ADAPTER=6800MandXCL_REQUIRE_GPUunset,cargo test --locked --workspace --no-fail-fast -j 1 -- --test-threads=1 --show-outputcompleted 36 targets: 125 passed, 1 failed, 20 ignored, and 4 explicitSKIPPEDlines (two title debug-layer variants withoutd3d12SDKLayers.dll, one no heap windows, one texture-upload check without the D3D12 debug layer). The library target separately aborted with0xc0000005duringraw_loads_in_root_windows_respect_exec_and_boundsafter 85okand oneignoredprogress lines, so it has no final counts. The completed-target failure wasoffline_split_compute_pipeline_is_reused_by_a_second_process: its warm run expected five loaded driver-cache pipelines and reported zero.maincontrol,cargo test --locked -p xcl --lib -j 1 -- --test-threads=1 --show-outputwith the same RX 6800M selection, also aborted with0xc0000005in that exactraw_loads_in_root_windows_respect_exec_and_boundstest after 85okand oneignoredprogress lines.cargo test --locked -p xcl --test gpu_compute_e2e -j 1 offline_split_compute_pipeline_is_reused_by_a_second_process -- --exact --test-threads=1 --nocapture, reproduced the same warm-cache assertion on this RX 6800M: 0 passed, 1 failed, 0 ignored, 0 skipped; five pieces rebuilt and zero loaded. Both workspace failures therefore also occur without this VFS patch.cargo test --workspace --no-fail-fast -- --test-threads=4completed with 1,436 passed, 0 failed, 47 ignored, and 25 explicit GPU skips. The VFS regression passed three repeated runs; a scratch mutation removingMAXIMUM_ALLOWEDfromWRITE_ACCESSmade it fail by selecting the original game file. These are the independent reporter's results, not runs on our RX 6800M.Regression run
scripts/smoke.ps1 -Game <owned title folder> -Seconds 60withXCL_ADAPTER=6800M, separate fresh XCL data and DXIL cache directories, and clean exact-head release builds. Same title hash and duration. Main showed 759 frames and 14,513 MB peak commit; the patch showed 771 frames and 14,494 MB. These runs check general startup and presentation, not a provenMAXIMUM_ALLOWEDopen.Main:
PR head:
Copy-on-open cost
MAXIMUM_ALLOWEDmay grant write rights, so this patch uses that path even if the caller only reads. A large archive opened this way can therefore be copied in full and consume matching overlay space. The title smoke did not establish whether it opens archives withMAXIMUM_ALLOWED; that workload and cost remain unmeasured. Avoiding an eager copy would need a safe way to redirect a later write without giving the title a writable handle to the original game file.Not tested
MAXIMUM_ALLOWED; the regression fixture tests routing and the retail smoke checks general startup behavior.AI use
Related
is_writeand remains semantically compatible. If both PRs land, their new VFS unit tests occupy the same insertion point and may need a test-only rebase resolution.@fromthemoonx on GitHub · 2026-11-26 07:06 UTC · original
A complete GPU workspace suite (listed under Not tested): passes on NVIDIA, and the new test fails without the
MAXIMUM_ALLOWEDbit. One question about the cost, below.Tested:
c4d0131(its base is currentmainb49be18, so head = merged). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug.cargo test --workspace --no-fail-fast -- --test-threads=4SKIPPEDlines; the library process ran to the end (no0xc0000005here)vfs::tests::maximum_allowed_open_uses_an_overlay_copy, 3 runsMAXIMUM_ALLOWEDtaken out ofWRITE_ACCESSagainopen_decisionreturns the game folder'sdata\hello.txtinstead of the overlay pathA question about the cost: with this, an
OPEN_EXISTINGopen withMAXIMUM_ALLOWEDand no write bit takes the copy-on-write path, so the whole file is copied into the overlay when it is opened (the test checks the copy hasoriginalright afteropen_decision). If a title usesMAXIMUM_ALLOWEDto open its large archives just for reading, each such file would then be copied to the data folder on its first open. Is that intended? Another option is to open the original with read rights in that case, or to copy only on the first write. I have not checked whether the retail title opens files this way.Not tested: a title that opens files with
MAXIMUM_ALLOWED, a release build, AMD.AI use: Claude Code (Claude Opus 5.5) ran the suite and the scratch change, read
open_decision, and wrote this report.@luckyteagirl on GitHub · 2026-11-26 07:33 UTC · original
Thanks for the full GPU suite and mutation check. Yes: with the current VFS copy-on-open design,
MAXIMUM_ALLOWEDtakes the write-capable path and eagerly copies an existing game file, even if this caller only reads. That preserves the game folder when Windows grants write access, but could be expensive for a large archive. My 12-second title smoke did not show whether the title uses this access mask on archives, so I have added this cost and the missing measurement to the PR description. A lazy copy would need to intercept a later write while keeping the original file unwritable through the returned handle; the current path cannot safely defer it. AI-assisted response with Codex.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.