mount: let a queued close reach the filer before linking the file

With writeback caching a new file is created on the filer by its queued
close, and a listed directory serves the source from the cache, so a link
right after close updated a name the filer did not have yet and failed
with EIO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-13 01:46:12 -08:00
1 parent 641c5081c7
commit dff55a844c
1 file changed
+4
+4
View File
@@ -61,6 +61,10 @@ func (wfs *WFS) Link(cancel <-chan struct{}, in *fuse.LinkIn, name string, out *
ctx, cancelFunc := ctxFromCancel(cancel)
defer cancelFunc()
// A queued close may not have created or updated the source on the filer.
if !wfs.waitForPendingAsyncFlush(ctx, sourceInode) {
return fuse.EINTR
}
oldEntry, _, status := wfs.maybeLoadEntry(ctx, oldEntryPath)
if status != fuse.OK {
return status