mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-31 01:59:51 +08:00
FUSE: implement dir fsync
fix https://github.com/chrislusf/seaweedfs/issues/1398
This commit is contained in:
parent
3bbac0820b
commit
df7eee523b
@ -27,6 +27,7 @@ type Dir struct {
|
||||
var _ = fs.Node(&Dir{})
|
||||
var _ = fs.NodeCreater(&Dir{})
|
||||
var _ = fs.NodeMkdirer(&Dir{})
|
||||
var _ = fs.NodeFsyncer(&Dir{})
|
||||
var _ = fs.NodeRequestLookuper(&Dir{})
|
||||
var _ = fs.HandleReadDirAller(&Dir{})
|
||||
var _ = fs.NodeRemover(&Dir{})
|
||||
@ -90,6 +91,14 @@ func (dir *Dir) setRootDirAttributes(attr *fuse.Attr) {
|
||||
attr.BlockSize = 1024 * 1024
|
||||
}
|
||||
|
||||
func (dir *Dir) Fsync(ctx context.Context, req *fuse.FsyncRequest) error {
|
||||
// fsync works at OS level
|
||||
// write the file chunks to the filerGrpcAddress
|
||||
glog.V(3).Infof("dir %s fsync %+v", dir.FullPath(), req)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (dir *Dir) newFile(name string, entry *filer_pb.Entry) fs.Node {
|
||||
return dir.wfs.fsNodeCache.EnsureFsNode(util.NewFullPath(dir.FullPath(), name), func() fs.Node {
|
||||
return &File{
|
||||
|
Loading…
Reference in New Issue
Block a user