mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-18 19:19:24 +08:00
refactor: moved to locked entry
This commit is contained in:
@@ -25,7 +25,7 @@ func (wfs *WFS) GetAttr(cancel <-chan struct{}, input *fuse.GetAttrIn, out *fuse
|
||||
} else {
|
||||
if fh, found := wfs.fhmap.FindFileHandle(inode); found {
|
||||
out.AttrValid = 1
|
||||
wfs.setAttrByPbEntry(&out.Attr, inode, fh.entry)
|
||||
wfs.setAttrByPbEntry(&out.Attr, inode, fh.entry.GetEntry())
|
||||
out.Nlink = 0
|
||||
return fuse.OK
|
||||
}
|
||||
@@ -44,10 +44,6 @@ func (wfs *WFS) SetAttr(cancel <-chan struct{}, input *fuse.SetAttrIn, out *fuse
|
||||
if status != fuse.OK {
|
||||
return status
|
||||
}
|
||||
if fh != nil {
|
||||
fh.entryLock.Lock()
|
||||
defer fh.entryLock.Unlock()
|
||||
}
|
||||
|
||||
if size, ok := input.GetSize(); ok && entry != nil {
|
||||
glog.V(4).Infof("%v setattr set size=%v chunks=%d", path, size, len(entry.GetChunks()))
|
||||
|
Reference in New Issue
Block a user