VFS: let fsync synchronize directory file descriptors#930
Closed
brandonpayton wants to merge 1 commit into
Closed
Conversation
Delegate fsync on directory descriptors to the active filesystem backend so Node can issue its native durability barrier. Keep memory-backed and OPFS behavior truthful at their host boundaries, and cover the kernel, host backends, Chromium OPFS, and POSIX regression path.
This was referenced Jul 13, 2026
Member
Author
|
Closing this focused source PR because its directory |
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.
What #907 already landed
#907 landed the broad PHP platform batch, including the mmap and munmap work that was mixed into #769. This PR does not replay that composite history, and it does not describe the old #769 commit as merged verbatim.
Directory
fsync()was still unique work. The old source was #769 commitf76741d59, but its unconditional kernel no-op was not kept.What remains
fsync()accept regular-file and directory descriptors, then delegate both to the active filesystem backendfsync()as a no-op because those writes are already synchronousfsync()succeed at the documented browser boundary: the File System API has fileflush(), but no directory flush primitiveWhat was deliberately removed
fsync()adds a crash-durability barrierABI and package impact
This does not change syscall numbers, marshalling, layouts, exports, generated ABI evidence, or
ABI_VERSION. The ABI check passes.No package metadata, package revision, binary index, VFS image, or committed package artifact changes. SQLite, Tcl, and browser images were built only as local validation prerequisites. No output revision needs a bump.
Validation run
All project validation commands ran through
scripts/dev-shell.sh.92d5940f7e0107514ea12ab813d395257678377efsync: 3 passedfsync: 1 passedsort2.test: 13 cases, 0 errors./run.sh browserpreparation completed, the Vite app returned HTTP 200 with COOP/COEP isolation headers, and the prepared non-slow Chromium suite passed 52 tests with 4 intentional skipsNode SQLite
sort2.testran all 13 cases and reported 4unable to open database fileerrors in its second pass. That is the existing positioned-I/O cleanup already documented on #786; Chromium passed the same test and this PR does not change positioned I/O.Validation not run