fix: update VFSNode path cache after rename in host_fs FUSE mount#80
Merged
jingkaihe merged 4 commits intojingkaihe:mainfrom Mar 2, 2026
Merged
Conversation
After a successful rename() through the host_fs FUSE mount, the guest FUSE client (guest-fused) was not updating the cached VFSNode.path field or go-fuse's internal inode tree. This caused subsequent open() calls on the renamed file to send the old (deleted) path to the host VFS server, resulting in ENOENT — even though readdir and stat returned correct data. This broke git operations, since git uses atomic writes (write to .lock temp file, then rename over target) for nearly every mutating operation including checkout, commit, and add. The fix adds two operations after a successful rename RPC in both VFSRoot.Rename and VFSNode.Rename: 1. Update the child VFSNode.path to the new path 2. Call MvChild to update go-fuse's internal inode tree Includes a minimal reproduction example in examples/host-fs-rename-repro. This PR was generated with the assistance of Claude Code (claude-opus-4-6). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
LMK if you want anything else on this, @jingkaihe! This filesystem stuff is over my head 😅 |
Owner
|
@sosso please can you create an issue for this? e.g. how to reprod? what is expected and what is the actual behaviour |
Contributor
Author
Done! #81. Wasn't sure if you wanted an issue first before a PR (since Discussions are deactivated on this repo), but I managed to get this working on my local, so I submitted this one. LMK if it makes sense 👍 |
…rkflows Signed-off-by: Jingkai He <jingkai@hey.com>
Contributor
Author
|
Ah, I see your tests now. I did ask Opus about tests and it said things were going to be too heavy. Those look great! |
jingkaihe
added a commit
to RealScout/matchlock
that referenced
this pull request
Mar 2, 2026
Signed-off-by: Jingkai He <jingkai@hey.com>
Signed-off-by: Jingkai He <jingkai@hey.com>
f642163 to
95352eb
Compare
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.
Issue: #81