aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle_read.go
diff options
context:
space:
mode:
authorzemul <zemul@foxmail.com>2023-04-14 13:32:45 +0800
committerGitHub <noreply@github.com>2023-04-13 22:32:45 -0700
commit0122e022eac2fea92b68af89dbbe175325359771 (patch)
tree8a0182a14d12a339dca7df2924ac92f1024e7738 /weed/mount/filehandle_read.go
parent5614ad0000e443f891d9c58706d6b7ce1d305afa (diff)
downloadseaweedfs-0122e022eac2fea92b68af89dbbe175325359771.tar.xz
seaweedfs-0122e022eac2fea92b68af89dbbe175325359771.zip
Mount concurrent read (#4400)
* fix:mount deadlock * feat: concurrent read * fix * Remove useless code * fix --------- Co-authored-by: zemul <zhouzemiao@ihuman.com>
Diffstat (limited to 'weed/mount/filehandle_read.go')
-rw-r--r--weed/mount/filehandle_read.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go
index 0684d0ba4..7b2629c13 100644
--- a/weed/mount/filehandle_read.go
+++ b/weed/mount/filehandle_read.go
@@ -23,8 +23,8 @@ func (fh *FileHandle) readFromDirtyPages(buff []byte, startOffset int64, tsNs in
}
func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, int64, error) {
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
+ fh.entryLock.RLock()
+ defer fh.entryLock.RUnlock()
fileFullPath := fh.FullPath()