hle(dstorage): retain file references while reads are in flight #182

Closed
github-bot wants to merge 1 commit from gh-pr/182/head into gh-pr/182/base
Owner

@⁠Androtim on GitHub · 2026-11-30 02:06 UTC · original
Androtim:feat/iter179-dstorage-file-hold → main · +70 −11 · 1 files · 1 commits · closed without merging

Summary

  • Retain DirectStorage file handles across in-flight reads (dstorage.rs):
    • Added FileHold(*mut Instance<File>) (add_ref_instance in FileHold::of for non-null non-memory sources, release in Drop) stored on enqueued Read entries (Read::new) and active Jobs.
    • Dropped job.file.take() outside scheduler.lock() in work() after the read completes and traces flush, preventing dangling pointers when the title releases its last file handle immediately after submitting reads.
    • Added dstorage::tests::a_file_released_with_reads_in_flight_is_read verifying that in-flight reads complete cleanly with full file contents after the caller releases the file.

Verification

  • cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy: asset policy: 311 files ok
  • cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle dstorage::: 24 passed; 0 failed; 1 ignored (including a_file_released_with_reads_in_flight_is_read)
  • cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings (default and --features diagnostics): clean
**@⁠Androtim** on GitHub · 2026-11-30 02:06 UTC · [original](https://github.com/Androtim/MiniVI/pull/182) `Androtim:feat/iter179-dstorage-file-hold` → `main` · +70 −11 · 1 files · 1 commits · closed without merging ## Summary - **Retain DirectStorage file handles across in-flight reads (`dstorage.rs`):** - Added `FileHold(*mut Instance<File>)` (`add_ref_instance` in `FileHold::of` for non-null non-memory sources, `release` in `Drop`) stored on enqueued `Read` entries (`Read::new`) and active `Job`s. - Dropped `job.file.take()` outside `scheduler.lock()` in `work()` after the read completes and traces flush, preventing dangling pointers when the title releases its last file handle immediately after submitting reads. - Added `dstorage::tests::a_file_released_with_reads_in_flight_is_read` verifying that in-flight reads complete cleanly with full file contents after the caller releases the file. ## Verification - `cargo +1.98.1-x86_64-pc-windows-gnu run -p xtask -- policy`: `asset policy: 311 files ok` - `cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-hle dstorage::`: `24 passed; 0 failed; 1 ignored` (including `a_file_released_with_reads_in_flight_is_read`) - `cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings` (default and `--features diagnostics`): clean
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 20:16:26 +00:00
github-bot closed this pull request 2026-12-01 20:16:26 +00:00
Author
Owner

@⁠Androtim on GitHub · 2026-11-30 03:03 UTC · original · edited 2026-11-30 16:02 UTC

Automated triage for the maintainers (not an approval).

Verdict: needs-rebase · CI (check): passing

This PR no longer merges cleanly into main.

To change the verdict: Rebase onto current main and resolve conflicts; CI and triage will run again automatically.


Generated with Antigravity CLI (agy).

**@⁠Androtim** on GitHub · 2026-11-30 03:03 UTC · [original](https://github.com/Androtim/MiniVI/pull/182#issuecomment-7267550657) · edited 2026-11-30 16:02 UTC <!-- minivi-triage v1 head=cce802e460ebeec5d890dc8bb50dd0eb04838ac5 verdict=needs-rebase ci=passing at=2026-11-30T16:02:50Z --> Automated triage for the maintainers (not an approval). **Verdict:** `needs-rebase` · **CI (`check`):** `passing` This PR no longer merges cleanly into `main`. **To change the verdict:** Rebase onto current `main` and resolve conflicts; CI and triage will run again automatically. --- _Generated with Antigravity CLI (`agy`)._
Author
Owner

@⁠Androtim on GitHub · 2026-12-01 01:38 UTC · original

Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

**@⁠Androtim** on GitHub · 2026-12-01 01:38 UTC · [original](https://github.com/Androtim/MiniVI/pull/182#issuecomment-7297737075) Closing stale/conflicted backlog PR per #276. Superseded by the active root-architecture replacement pillars with isolated plain --release A/B verification.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Androtim--MiniVI!182
No description provided.