Skip to content

VFS: keep pread and pwrite from changing shared file offsets#786

Closed
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-c5i.11-sharedfs-open-temp-lifetime
Closed

VFS: keep pread and pwrite from changing shared file offsets#786
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-c5i.11-sharedfs-open-temp-lifetime

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jun 28, 2026

Copy link
Copy Markdown
Member

What this keeps

#907 already landed the open-unlinked and rename-replaced inode lifetime fix, including the lifetime regressions that used to be part of this PR.

The unique work left here is smaller:

  • add locked SharedFS.readAt and SharedFS.writeAt operations that do not touch the shared descriptor cursor
  • route positioned MemoryFileSystem reads and writes through those operations instead of seek/read-or-write/restore
  • keep pwrite on its explicit offset even when the descriptor has O_APPEND
  • cover both the direct SharedFS API and the MemoryFileSystem positioned-I/O path

What was removed

The rewritten branch drops all inode open-reference, unlink, rename, and close-lifetime changes and their duplicate tests because #907 already landed that behavior. The old head is recorded in the PR comments.

ABI and package impact

This does not change the kernel/host ABI, generated ABI evidence, package metadata, package revisions, or committed package artifacts. bash scripts/check-abi-version.sh stays clean.

Validation run

All commands below ran through scripts/dev-shell.sh.

  • host typecheck passed
  • focused positioned-I/O and VFS tests passed
  • full host Vitest passed: 170 files, 1,375 tests, 2 expected failures, 26 skipped
  • wasm32 and wasm64 musl builds passed
  • ABI check passed
  • Chromium SQLite config=memsubsys1 test/sort2.test passed 1 job / 11 cases / 0 errors after applying the separate child-testrunner platform shim to the ignored downloaded SQLite source
  • Node SQLite reached the same 11 cases but still reported 3 unable to open database file errors on the host-backed filesystem path; this PR remains a draft while that separate result is owned by the SQLite/platform cleanup

Validation not run

Firefox and WebKit were not run. The external libc, POSIX, and Sortix suites were considered but not rerun because this diff stays inside the TypeScript SharedFS backend and does not change syscall, libc, or ABI behavior. Performance was not measured and this PR makes no performance claim.

@github-actions

github-actions Bot commented Jun 28, 2026

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-786-staging

ABI v39. 6 built, 0 failed, 6 total.

Package Arch Status Sha
kandelo-sdk wasm32 built 146b1c99
rootfs wasm32 built c6e97850
shell wasm32 built 259016c2
lamp wasm32 built 85b6b3e7
node-vfs wasm32 built 46c8b977
wordpress wasm32 built 58f8d686

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

@brandonpayton

Copy link
Copy Markdown
Member Author

Before narrowing this PR onto current main, its head was d494aefaefbed5f3335fd15dc6c732a6d5b97128. That composite commit included open-unlinked inode lifetime handling now present through #907 plus the remaining positioned-I/O work. The rewrite will retain only the atomic SharedFS readAt/writeAt path and the pread/pwrite shared-offset regression.

@brandonpayton brandonpayton force-pushed the gascity/kd-c5i.11-sharedfs-open-temp-lifetime branch from d494aef to 905dbc0 Compare July 13, 2026 18:15
@brandonpayton brandonpayton changed the title vfs: preserve open unlinked SharedFS files VFS: keep pread and pwrite from changing shared file offsets Jul 13, 2026
@brandonpayton

Copy link
Copy Markdown
Member Author

Closing this focused source PR because #934 now carries its unique positioned-I/O offset-independence work at exact green head 260d75d5adc31b327f5591229dbfbb287d395fd6. The open-unlinked lifetime work was already on main through #907 and was deliberately excluded. The full staging and browser gates passed. This is not a claim that this branch was merged verbatim.

@brandonpayton brandonpayton deleted the gascity/kd-c5i.11-sharedfs-open-temp-lifetime branch July 14, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant