common: return real Win32 cache flags from GetCacheAccessType #673

Manually merged
github merged 1 commit from gh-pr/673/head into gh-pr/673/base 2026-11-26 09:28:57 +00:00
Owner

@⁠c0sxm0s on GitHub · 2026-09-17 13:57 UTC · original
c0sxm0s:win-file-cache-flags → main · +2 −2 · 1 files · 1 commits · merged 2026-09-20 14:47 UTC

GetCacheAccessType returned the sys_file_cache_type_t enum values as CreateFileW flags: SYS_FILE_CACHE_SEQUENTIAL_SCAN (2) became FILE_ATTRIBUTE_HIDDEN and SYS_FILE_CACHE_AUTO (0) lost the normal attributes, and no FILE_FLAG_SEQUENTIAL_SCAN hint was ever applied. Return FILE_FLAG_SEQUENTIAL_SCAN / FILE_ATTRIBUTE_NORMAL instead, mirroring the POSIX fadvise handling on Linux.

**@⁠c0sxm0s** on GitHub · 2026-09-17 13:57 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/673) `c0sxm0s:win-file-cache-flags` → `main` · +2 −2 · 1 files · 1 commits · merged 2026-09-20 14:47 UTC GetCacheAccessType returned the sys_file_cache_type_t enum values as CreateFileW flags: SYS_FILE_CACHE_SEQUENTIAL_SCAN (2) became FILE_ATTRIBUTE_HIDDEN and SYS_FILE_CACHE_AUTO (0) lost the normal attributes, and no FILE_FLAG_SEQUENTIAL_SCAN hint was ever applied. Return FILE_FLAG_SEQUENTIAL_SCAN / FILE_ATTRIBUTE_NORMAL instead, mirroring the POSIX fadvise handling on Linux.
GetCacheAccessType returned the sys_file_cache_type_t enum values as
CreateFileW flags: SYS_FILE_CACHE_SEQUENTIAL_SCAN (2) became
FILE_ATTRIBUTE_HIDDEN and SYS_FILE_CACHE_AUTO (0) lost the normal
attributes, and no FILE_FLAG_SEQUENTIAL_SCAN hint was ever applied.
Return FILE_FLAG_SEQUENTIAL_SCAN / FILE_ATTRIBUTE_NORMAL instead,
mirroring the POSIX fadvise handling on Linux.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:28:56 +00:00
github manually merged commit b83f579d56 into gh-pr/673/base 2026-11-26 09:28:57 +00:00
Author
Owner

@⁠coderabbitai[bot] on GitHub · 2026-09-17 14:00 UTC · original

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 8b850be3-96e7-4e1b-9628-64187492a0cf

📥 Commits

Reviewing files that changed from the base of the PR and between c66d977c1d and b83f579d56.

📒 Files selected for processing (1)
  • src/common/platform/sysWindowsFileIO.cpp

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

GetCacheAccessType now returns FILE_ATTRIBUTE_NORMAL for automatic or unrecognized cache types. Explicit sequential-scan behavior remains unchanged.

Suggested reviewers: nmzik

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b83f5

The Windows cache mapping uses the intended valid file flags, with no remaining merge-blocking issue identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: returning valid Win32 cache flags from GetCacheAccessType.
Description check ✅ Passed The description accurately explains the incorrect flag mapping and the intended FILE_FLAG_SEQUENTIAL_SCAN and FILE_ATTRIBUTE_NORMAL behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

**@⁠coderabbitai[bot]** on GitHub · 2026-09-17 14:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/673#issuecomment-5715621250) <!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- review_stack_entry_start --> <a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/673#gh-light-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg" alt="Review Change Stack" width="202" height="32"></a><a href="https://app.coderabbit.ai/change-stack/KytyPS5/KytyPS5/pull/673#gh-dark-mode-only"><img src="https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui-dark.svg" alt="Review Change Stack" width="202" height="32"></a> <!-- review_stack_entry_end --> <!-- recent_review_start --> No actionable comments were generated in the recent review. 🎉 <details> <summary>ℹ️ Recent review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Path: .coderabbit.yaml **Review profile**: CHILL **Plan**: Advanced **Run ID**: `8b850be3-96e7-4e1b-9628-64187492a0cf` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between c66d977c1d8f0e9cbeec71c2dbc57eb3e0000d45 and b83f579d56cd258ab076b0f34e21a544262b7dda. </details> <details> <summary>📒 Files selected for processing (1)</summary> * `src/common/platform/sysWindowsFileIO.cpp` </details> **Included review availability:** Your plan provides up to 10 included reviews per hour; 8 remain after this review. </details> --- <!-- recent_review_end --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough `GetCacheAccessType` now returns `FILE_ATTRIBUTE_NORMAL` for automatic or unrecognized cache types. Explicit sequential-scan behavior remains unchanged. **Suggested reviewers:** `nmzik` </details> <!-- walkthrough_end --> <!-- change_assessment_start --> **Priority:** ⬇️ Low <!-- change_assessment_commit:"b83f579d56cd258ab076b0f34e21a544262b7dda" --> **Change:** Bug fix <!-- change_assessment_end --> <!-- final_review_risk_start --> **Merge Risk:** _⚪ Minimal_ · up to `b83f5` <!-- final_review_risk_coverage:{"sourceCommitId":"b83f579d56cd258ab076b0f34e21a544262b7dda","coveredCommitId":"b83f579d56cd258ab076b0f34e21a544262b7dda","kind":"reviewed"} --> The Windows cache mapping uses the intended valid file flags, with no remaining merge-blocking issue identified. <!-- final_review_risk_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 4 | ❌ 1</summary> ### ❌ Failed checks (1 warning) | Check name | Status | Explanation | Resolution | | :----------------: | :--------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | | Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | <details> <summary>✅ Passed checks (4 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------- | | Title check | ✅ Passed | The title clearly identifies the main change: returning valid Win32 cache flags from GetCacheAccessType. | | Description check | ✅ Passed | The description accurately explains the incorrect flag mapping and the intended FILE_FLAG_SEQUENTIAL_SCAN and FILE_ATTRIBUTE_NORMAL behavior. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | </details> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- tips_start --> --- <sub>Comment `@coderabbitai help` to get the list of available commands.</sub> <!-- tips_end -->
This discussion has been locked. Commenting is limited to contributors.
No description provided.