mount: file fsync

fix https://github.com/chrislusf/seaweedfs/issues/2561
This commit is contained in:
chrislu
2022-01-10 00:52:16 -08:00
parent 19555385f7
commit cbc055dc2b
3 changed files with 27 additions and 2 deletions

View File

@@ -114,7 +114,9 @@ func (dir *Dir) handleRenameResponse(ctx context.Context, resp *filer_pb.StreamR
if existingHandle, found := dir.wfs.handles[inodeId]; found && existingHandle != nil {
glog.V(4).Infof("opened file handle %s => %s", oldPath, newPath)
delete(dir.wfs.handles, inodeId)
existingHandle.handle = newPath.AsInode()
existingHandle.f.entry.Name = newName
existingHandle.f.id = newPath.AsInode()
dir.wfs.handles[newPath.AsInode()] = existingHandle
}
dir.wfs.handlesLock.Unlock()