diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-23 15:48:02 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-23 15:48:02 -0700 |
| commit | aee27ccbe131578b8627022165d17a972153f0a0 (patch) | |
| tree | 196e2fd4ecc191197c6c3b56e2466a547ff85283 /weed/filesys/wfs.go | |
| parent | c19245886c39fcc7f25db5d3963e7cbe40fa786f (diff) | |
| download | seaweedfs-aee27ccbe131578b8627022165d17a972153f0a0.tar.xz seaweedfs-aee27ccbe131578b8627022165d17a972153f0a0.zip | |
multiple fixes
* adjust isOpen count
* move ContinuousDirtyPages lock to filehandle
* fix problem with MergeIntoVisibles, avoid reusing slices
* let filer delete the garbage
Diffstat (limited to 'weed/filesys/wfs.go')
| -rw-r--r-- | weed/filesys/wfs.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/weed/filesys/wfs.go b/weed/filesys/wfs.go index f147d7548..e9ee0864b 100644 --- a/weed/filesys/wfs.go +++ b/weed/filesys/wfs.go @@ -118,10 +118,14 @@ func (wfs *WFS) AcquireHandle(file *File, uid, gid uint32) (fileHandle *FileHand inodeId := file.fullpath().AsInode() existingHandle, found := wfs.handles[inodeId] if found && existingHandle != nil { + file.isOpen++ return existingHandle } fileHandle = newFileHandle(file, uid, gid) + file.maybeLoadEntry(context.Background()) + file.isOpen++ + wfs.handles[inodeId] = fileHandle fileHandle.handle = inodeId |
