Skip to content

fix(appcontent): track temporary storage mounts - #1320

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
TibixDev:pr/temporary-storage-lifecycle
Oct 8, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
TibixDev:pr/temporary-storage-lifecycle

Conversation

@TibixDev

@TibixDev TibixDev commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

What

Track the /temp0 mount. Reject a second mount, preserve files on unmount, block new path lookups while unmounted, and restore access on remount. Initialization also blocks files left by a previous run. Format and space queries require an active mount.

Supersedes the sceAppContentTemporaryDataUnmount stubs in #407/#545 for this function. It does not replace the other work in those PRs.

Tested

Fedora 44, Release: app-content, working-directory, and directory tests. Covers remount, formatting, invalid arguments, unchanged output on failure, and neighboring paths. Contribution checks pass.

Open file handles remain usable after unmount. Console behavior for that case is unverified and documented in TechnicalDebt. Windows was not tested.

Checklist

  • Current main; related stubs and implementations checked.
  • One topic.
  • No new code comments.
  • Unsupported paths still throw; UI stubs are documented.
  • No notes, logs, or images in the repository.
  • No new third-party code.
  • General behavior.
  • Depends on: none.
  • AI-assisted: yes.

@TibixDev

TibixDev commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Reproduced with Skyrim, PPSA03747, content version 01.001.010, on upstream a9ba39c927713cf294b8e1b7877ddb365d3a1d6f. Linux, GCC 16, Release build in Fedora 44.

A fresh relink with the default eager binding exits with code 127 before guest startup:

undefined symbol: bcolXMmp6qQ

This is the NID for sceAppContentTemporaryDataUnmount, imported by Skyrim. The function is absent from upstream. Applying only this PR clears that loader failure; startup then stops on the reachability-unregister import addressed by #1322. guest_appcontent passes on this upstream-based test branch.

This proves a missing-import startup blocker. It does not prove that Skyrim executes the unmount body before startup or establish console-equivalent mount semantics. This supplies the title evidence requested in #1299.

AI-assisted investigation and reply.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Progress report (b1c5f10 → 3355524)

➖ System libraries: 85.41% (+0.0%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceAppContent sceAppContentTemporaryDataUnmount

@TibixDev
TibixDev force-pushed the pr/temporary-storage-lifecycle branch from 622f352 to 641c70d Compare October 8, 2026 05:22
@TibixDev

TibixDev commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on 5850a6cd and resolved the documentation conflict. App-content, working-directory and directory tests pass on Fedora 44 Release. The implementation is unchanged.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
@TibixDev

TibixDev commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on bc1fbe81. Preserved upstream app-content and filesystem changes; mount behavior is unchanged.

Fedora 44 Release: guest_appcontent_tests, guest_working_directory_tests, guest_directory_tests build; the targeted tests and contribution checks pass. Windows CI is pending.

@TibixDev
TibixDev force-pushed the pr/temporary-storage-lifecycle branch from 641c70d to 5861b0f Compare October 8, 2026 07:03
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 8, 2026
Preserve files across unmount, block new lookups until remount, and validate mount-dependent operations. Keep prior-run storage inaccessible after initialization.

Written with AI assistance.
@adriadam10
adriadam10 force-pushed the pr/temporary-storage-lifecycle branch from 5861b0f to 3355524 Compare October 8, 2026 11:13
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the error codes and the mount/unmount/format/space-query state machine against fpPS4 sys_path.pas (BUSY on a second mount, NOT_MOUNTED for format/space/unmount without a mount, PARAMETER for an unknown option): they match. guest_app_content fails without the change and the full ctest passes (442/442) on the rebase.

It conflicted with main only by adjacency (RecordWrittenPath/SyncWrittenPaths next to BlockPathAlias in General.hpp/.cpp, and Mount2 in Export.cpp). I rebased and kept both, including the RecordWrittenPath on directory creation. Merging once CI is green on the rebased head.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#1524 docs/dev/TechnicalDebt.md L322
#1526 docs/dev/TechnicalDebt.md L322
#1535 docs/dev/TechnicalDebt.md L322

@adriadam10
adriadam10 merged commit 4f41832 into boykopovar:main Oct 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs libc needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants