VFS: the free-space log shows only what the caller asked for #1657

Open
M3lonade wants to merge 1 commit from upstream-pr/1667 into main
M3lonade commented 2026-11-24 19:01:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by M3lonade on 2026-11-24T19:01:09Z.


The free-space log line (GetDiskFreeSpaceEx…: N MiB available of T MiB) read a NULL lpFreeBytesAvailableToCaller as 0. The API allows NULL for any of its three outputs, and in every run of the retail title a system component asks about C:\WINDOWS\system32 and C:\WINDOWS for the total only, so the log says 0 MiB available of 952974 MiB on a disk with ~270 GB available. #781 asks about it as a possible "disk full" answer to the title. Now the line names only what the caller asked for; the answer itself is unchanged. Part of #781.

What is in it

  • crates/xcl/src/vfs_hooks.rs: ex_answer returns each of (available, total, free) as asked or None, and space_text builds the line: "N MiB available of T MiB" as before, "N MiB free of T MiB (available not asked)", "total T MiB (free space not asked)". GetDiskFreeSpaceA/W (clusters) log as before.
  • Test vfs_hooks::tests::free_space_log_names_only_what_was_asked.

Tested

  • NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release.
  • cargo build --workspace + cargo test --workspace -- --test-threads=4: 859 passed, 0 failed, 42 ignored.
  • SKIPPED on this adapter: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Retail title 1.0.2.1: the two lines for C:\WINDOWS\system32 and C:\WINDOWS read 0 MiB available of 952974 MiB on main and total 952974 MiB (free space not asked) with this change (the caller asks for the total only); the title's own query (the shader cache folder) logs … MiB available of 952974 MiB as before.

Regression run

main c160d86e:

xcl-smoke v1
commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1647 (PresentX 1647)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15954 MB

this PR c09c3c76:

xcl-smoke v1
commit: c09c3c7643a40474816f3aa14cb59521a8e2dc03
gpu: NVIDIA GeForce RTX 4080 SUPER
title: 2f5362b1
seconds: 60
exit: 0x0
frames shown: 1677 (PresentX 1677)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16049 MB

Not tested

  • A title that asks for the available bytes on a translated path with a NULL total (covered by the unit test only).
  • AMD and Intel GPUs; Wine.

AI use

  • Claude Code (Claude Opus 5.5): found the cause from the retail title's logs, wrote the change, the test and this description, and ran the tests and the regression runs.
<!-- greyfinch-sync:ivall/xcl:issue:5478474027 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1667). Originally posted by [M3lonade](https://github.com/M3lonade) on 2026-11-24T19:01:09Z. --- The free-space log line (`GetDiskFreeSpaceEx…: N MiB available of T MiB`) read a NULL `lpFreeBytesAvailableToCaller` as 0. The API allows NULL for any of its three outputs, and in every run of the retail title a system component asks about `C:\WINDOWS\system32` and `C:\WINDOWS` for the total only, so the log says `0 MiB available of 952974 MiB` on a disk with ~270 GB available. #781 asks about it as a possible "disk full" answer to the title. Now the line names only what the caller asked for; the answer itself is unchanged. Part of #781. **What is in it** - `crates/xcl/src/vfs_hooks.rs`: `ex_answer` returns each of (available, total, free) as asked or `None`, and `space_text` builds the line: "N MiB available of T MiB" as before, "N MiB free of T MiB (available not asked)", "total T MiB (free space not asked)". `GetDiskFreeSpaceA/W` (clusters) log as before. - Test `vfs_hooks::tests::free_space_log_names_only_what_was_asked`. **Tested** - NVIDIA GeForce RTX 4080 SUPER 16 GB (driver 621.24), Ryzen 7 9700X, Windows 11 Pro 26200, Rust 1.98.0; tests debug, title release. - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4`: 859 passed, 0 failed, 42 ignored. - SKIPPED on this adapter: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (no wave64), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Retail title 1.0.2.1: the two lines for `C:\WINDOWS\system32` and `C:\WINDOWS` read `0 MiB available of 952974 MiB` on `main` and `total 952974 MiB (free space not asked)` with this change (the caller asks for the total only); the title's own query (the shader cache folder) logs `… MiB available of 952974 MiB` as before. **Regression run** main `c160d86e`: ``` xcl-smoke v1 commit: c160d86ef2efe3a07e4dfb473e4fa72eafb413c0 gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1647 (PresentX 1647) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15954 MB ``` this PR `c09c3c76`: ``` xcl-smoke v1 commit: c09c3c7643a40474816f3aa14cb59521a8e2dc03 gpu: NVIDIA GeForce RTX 4080 SUPER title: 2f5362b1 seconds: 60 exit: 0x0 frames shown: 1677 (PresentX 1677) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 16049 MB ``` **Not tested** - A title that asks for the available bytes on a translated path with a NULL total (covered by the unit test only). - AMD and Intel GPUs; Wine. **AI use** - Claude Code (Claude Opus 5.5): found the cause from the retail title's logs, wrote the change, the test and this description, and ran the tests and the regression runs.
futurepro62 commented 2026-11-25 00:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T23:52:00Z.


Full-suite run, since this PR has no test report yet. Tested exact head c09c3c7 (on its base c160d86).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 858 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: free_space_log_names_only_what_was_asked.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 859 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7147881565 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1667#issuecomment-7147881565). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T23:52:00Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `c09c3c7` (on its base `c160d86`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **858 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `free_space_log_names_only_what_was_asked`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **859 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `62265d3` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
JJAutoCompare commented 2026-11-25 05:08:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:44:29Z.


XCL PR #1667 verification

Clean detached head c09c3c7643a40474816f3aa14cb59521a8e2dc03 on STOR-WINLAB.
Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386 2026-11-09) (x86_64-pc-windows-msvc). Unoptimized profiles with incremental compilation and debug info disabled.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside the GPU mutex. The latter built 19 test executables.
  • cargo test -p xcl --lib vfs_hooks::tests::free_space_log_names_only_what_was_asked -- --exact ran with XCL_ADAPTER=NONE_CPU_ONLY outside the mutex. 1 passed, 0 failed, 0 ignored, 0 skipped, 831 filtered out. The new test in crates/xcl/src/vfs_hooks.rs checks free-only, free-plus-total, total-only, and caller-available-plus-total formatting, including precedence over free bytes and a failed API call returning no answer.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Cargo exited 101. The 20 test result: lines (19 executables and doc-tests) totaled 841 passed, 18 failed, and 42 ignored. The VFS test and the pls_quota integration test passed.

Workspace failures and skips

  • The library had 17 GPU failures. Thirteen reported CreateComputePipelineState error 0x80070057. Four reported mismatches in fused FMA overflow, implicit-LOD sampling, f16 high-half preservation, and wave64 pixel reductions.
  • test_title_runs_and_game_folder_is_untouched failed the test title's RSSetDepthBiasX check. Its top-right pixel was blue and the test expected green.
  • Six exact SKIPPED lines in pr1667-suite.log were included in libtest's passed total and excluded from coverage. Two lacked wave64, one lacked tiled resources tier 2, one lacked heap windows, and two lacked D3D12 debug-layer support.

Not tested

Matched main baseline, retail-title smoke runs, game-data fixtures (XCL_SAMPLE_* unset), and other GPUs. Regression attribution remains unverified.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1667-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7153121139 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1667#issuecomment-7153121139). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:44:29Z. --- # XCL PR #1667 verification Clean detached head `c09c3c7643a40474816f3aa14cb59521a8e2dc03` on STOR-WINLAB. Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver `32.0.101.9175`, DXC `1.9.2609.5`, and rustc `1.100.0 (0ef1bc386 2026-11-09)` (`x86_64-pc-windows-msvc`). Unoptimized profiles with incremental compilation and debug info disabled. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside the GPU mutex. The latter built 19 test executables. - `cargo test -p xcl --lib vfs_hooks::tests::free_space_log_names_only_what_was_asked -- --exact` ran with `XCL_ADAPTER=NONE_CPU_ONLY` outside the mutex. 1 passed, 0 failed, 0 ignored, 0 skipped, 831 filtered out. The new test in `crates/xcl/src/vfs_hooks.rs` checks free-only, free-plus-total, total-only, and caller-available-plus-total formatting, including precedence over free bytes and a failed API call returning no answer. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Cargo exited 101. The 20 `test result:` lines (19 executables and doc-tests) totaled 841 passed, 18 failed, and 42 ignored. The VFS test and the `pls_quota` integration test passed. **Workspace failures and skips** - The library had 17 GPU failures. Thirteen reported `CreateComputePipelineState` error `0x80070057`. Four reported mismatches in fused FMA overflow, implicit-LOD sampling, f16 high-half preservation, and wave64 pixel reductions. - `test_title_runs_and_game_folder_is_untouched` failed the test title's `RSSetDepthBiasX` check. Its top-right pixel was blue and the test expected green. - Six exact `SKIPPED ` lines in `pr1667-suite.log` were included in libtest's passed total and excluded from coverage. Two lacked wave64, one lacked tiled resources tier 2, one lacked heap windows, and two lacked D3D12 debug-layer support. **Not tested** Matched `main` baseline, retail-title smoke runs, game-data fixtures (`XCL_SAMPLE_*` unset), and other GPUs. Regression attribution remains unverified. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1667-suite.log` and published.
github-actions[bot] commented 2026-11-28 20:17:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T20:17:49Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7245182063 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1667#issuecomment-7245182063). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T20:17:49Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 06:27:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:27:27Z.


Triage (#1607) – head c09c3c7

No open or merged PR makes the same change. Main's ex_answer still turns a NULL available-bytes pointer into "0 MiB available".
No problems found in the diff. disk_free_ex now passes free through, the GetDiskFreeSpaceW/A lines read as before, and the new test checks the NULL-pointer cases. The PR conflicts with main in vfs_hooks.rs.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302892751 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1667#issuecomment-7302892751). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:27:27Z. --- **Triage (#1607)** – head c09c3c7 No open or merged PR makes the same change. Main's ex_answer still turns a NULL available-bytes pointer into "0 MiB available". No problems found in the diff. disk_free_ex now passes `free` through, the GetDiskFreeSpaceW/A lines read as before, and the new test checks the NULL-pointer cases. The PR conflicts with main in vfs_hooks.rs. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1667:upstream-pr/1667'
git switch 'upstream-pr/1667'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1667'
git switch 'upstream-pr/1667'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1667'
git switch 'upstream-pr/1667'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1667'
git switch 'main'
git merge --squash 'upstream-pr/1667'
git switch 'main'
git merge --ff-only 'upstream-pr/1667'
git switch 'main'
git merge 'upstream-pr/1667'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1657
No description provided.