mount: read data that is just written

able read on data not flushed
multiple file open shares the same file handle

fix https://github.com/chrislusf/seaweedfs/issues/1182 on linux
This commit is contained in:
Chris Lu
2020-01-22 13:42:03 -08:00
parent 09f4ceef3a
commit 6b48d246a5
5 changed files with 88 additions and 26 deletions

View File

@@ -146,9 +146,8 @@ func (dir *Dir) Create(ctx context.Context, req *fuse.CreateRequest,
}
file := node.(*File)
file.isOpen = true
file.isOpen++
fh := dir.wfs.AcquireHandle(file, req.Uid, req.Gid)
fh.dirtyMetadata = true
return file, fh, nil
}