vfs: handle current-position sentinel in memory files#64163
Open
trivikr wants to merge 1 commit into
Open
Conversation
Treat -1 as the current file position in MemoryFileHandle read and write operations. This matches the value passed by fs.readSync() after normalizing a null position. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: openai:gpt-5.5
This comment was marked as outdated.
This comment was marked as outdated.
Collaborator
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/64163 β Done loading data for nodejs/node/pull/64163 ----------------------------------- PR info ------------------------------------ Title vfs: handle current-position sentinel in memory files (#64163) β Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch trivikr:vfs-read-sync-position -> nodejs:main Labels author ready, needs-ci, vfs Commits 1 - vfs: handle current-position sentinel in memory files Committers 1 - Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> PR-URL: https://github.com/nodejs/node/pull/64163 Fixes: https://github.com/nodejs/node/issues/64162 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/64163 Fixes: https://github.com/nodejs/node/issues/64162 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> -------------------------------------------------------------------------------- βΉ This PR was created on Sat, 27 Jun 2026 06:27:18 GMT β Approvals: 1 β - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/64163#pullrequestreview-4606354361 β This PR needs to wait 46 more hours to land (or 0 minutes if there is one more approval) β Last GitHub CI successful βΉ Last Full PR CI on 2026-07-02T04:00:37Z: https://ci.nodejs.org/job/node-test-pull-request/74500/ - Querying data for job/node-test-pull-request/74500/ β Build data downloaded β Last Jenkins CI successful -------------------------------------------------------------------------------- β Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/28576287827 |
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.
Fixes: #64162
This updates VFS memory file handles to treat
-1as the current-positionsentinel for read and write operations.
fs.readSync()normalizes anullposition to-1before dispatching to VFS,but
MemoryFileHandlepreviously treated-1as an explicit offset. That mademounted in-memory files fail instead of reading from and advancing the current
file position.
Assisted-by: openai:gpt-5.5