Repository navigation
Image cache: reach webOS 3.4's one writable directory, sized to its free space - #667
Merged
Merged
Conversation
…ree space
On a 2016 set running webOS 3.4.3 every candidate failed
("imgcache: no writable directory"): /media/developer is root-owned and
/media/internal read-only, so every poster was fetched again on every
view. /media/developer/temp is writable there, persistent, and inside
the app's jail; it is now the third candidate.
That directory shares the partition installed apps live on (76.5 MB
free of 636 MB), so the byte cap is now the fixed 128 MiB clamped to half
of what the filesystem can spare (free space plus the cache's own
files), and the disk tier stays off below 8 MiB of spare. The startup
log line reports the cap.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: selfhealer-png <[email protected]>
check-list-caps (plxnative#605) requires a section for every cap-shaped site. MIN_CAP is the spare-disk floor below which the poster cache stays off; a work bound like its MAX_* siblings. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: selfhealer-png <[email protected]>
/media/developer/temp is mode 777, so a cache directory made there with the default mode let any other process read the cached posters. The new candidate (and only it) is now created 0700; an existing directory we own is tightened to 0700, and a foreign-owned directory or a symlink at the name is refused and the next candidate is tried. The mkdir/O_NOFOLLOW/fchmod sequence follows paths::share_runtime_dir. Tests were written first and failed with mode 0755 against 0700. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Collaborator
|
Merged, thank you @selfhealer-png! Great work. |
GLinnik21
added a commit
that referenced
this pull request
Oct 22, 2026
* Release notes and audit for v0.9.0 Action-required evaluation (README trigger list, read from the PRs, grep not run on a built tree): no hits that need a reader action. Launch links (#853) add an inbound surface (any app that can launch apps), stated in What's new; the 3.4 image cache writes to /media/developer/temp (#667); crash/error reports gain fixed-value fields with POLICY_VERSION unchanged (#632), stated under Changed; Watchlist and PMS notifications use hosts the app already reaches. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Release notes v0.9.0: coverage and accuracy pass Note: correct the Collections surfaces (no TYPE menu; collection shelf headings live on Home and a library's Recommended page), the Watchlist hold-menu rows, the launch-link sign-in behaviour and platform-release numbering, the notification-feed sentence and the per-profile settings list (no stale "nine"). Add #832, #808, #750/#762, #709 (#628), #641, #647, #793, #871, #877 (#679), #876 and the key-press frame work; credit RichiL10 and Shakil Choudhury. #862 moves from Known issues to the webOS 3.x lines as fixed by #578; the 3.9.3 source-build report (#700) is kept in Compatibility. Compatibility links reports, not reporters' profiles. Audit: #862 provenance (attributed usage-report reading, no counts), contributor list wording. Action-required section: not owed. The README grep over v0.8.0..origin/main (rust-modules/src src ci) hits only CI tooling, test-only loopback listeners and fixture tokens, and the dev-only /tmp/plxnative-trackmemory trigger; the audit's PR-by-PR reading in "Deliberately not done" stands. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Release audit v0.9.0: name the toolchain by its pin file, not its version Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Image cache: reach webOS 3.4's one writable directory, sized to its free space
On a webOS 3.4.3 set the poster disk cache was off entirely:
so every poster was fetched and decoded again on every view, across launches as well as within one.
Why
paths::image_cache_candidatestries/media/developer/<id>-imgcache, then/media/internal/.<id>-imgcache, then the app directory. On this set (55UH650V, webOS 3.4.3,Developer Mode), as the Developer Mode user, from SSH:
/media/developerPermission denied(root-owned,drwxrwxr-x root root)/media/internalRead-only file system/media/developer/temp/tmp/media/developer/tempisdrwxrwxrwx root rooton the/mediapartition (mmcblk0p52), andthe app's jail mounts
/media/developerread-write, so the app reaches it too.The change
/media/developer/temp/<id>-imgcache, after the two existing ones andbefore the app directory. Sets where an earlier candidate is writable are unchanged.
on this set. The fixed 128 MiB ceiling would have filled it and risked app installs and updates,
so the byte cap is now
min(128 MiB, (free + the cache's own bytes) / 2)for whichever rootis chosen, measured with
statvfsonce at startup. Below 8 MiB of spare the disk tier staysoff. On a roomy filesystem the result is the same 128 MiB as before. The startup line reports
it as
cap=.spare, too little to bother, unknown free space, a small configured limit honoured) and for
free_byteson a test directory.docs/image-cache.mdand thepaths.rsdoc say both.On the set
The cache came up on the new directory and grew across launches over two days:
Things I could not establish
world-writable parent. Other users cannot write into it, but other processes could read the
cached posters, which reveal what is in the library. I'd be happy to have
probe_dircreate thedirectory
0700(for this candidate, or all of them) if you'd prefer. I left it alone so thisPR only changes where and how much.
/media/developeralready, in which case nothing changes there.