mount: skip local chunk cache if opened write only

This commit is contained in:
Chris Lu
2021-05-06 03:31:40 -07:00
parent c899bdf063
commit 38f411219a
6 changed files with 16 additions and 8 deletions

View File

@@ -97,7 +97,7 @@ func (file *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.Op
glog.V(4).Infof("file %v open %+v", file.fullpath(), req)
handle := file.wfs.AcquireHandle(file, req.Uid, req.Gid)
handle := file.wfs.AcquireHandle(file, req.Uid, req.Gid, req.Flags&fuse.OpenWriteOnly > 0)
resp.Handle = fuse.HandleID(handle.handle)