mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 15:29:12 +01:00
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:
1 parent
641c5081c7
commit
dff55a844c
1 file changed
+4
@@ -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
|
||||
|
||||
Reference in new issue
Block a user