aboutsummaryrefslogtreecommitdiff
path: root/weed/mount/filehandle_read.go
diff options
context:
space:
mode:
authorPatrick Schmidt <patrick.schmidt@innogames.com>2022-08-22 02:11:43 +0200
committerGitHub <noreply@github.com>2022-08-21 17:11:43 -0700
commit3a75d7f7aaaf7d7102f6ead38a221f60cbec5652 (patch)
tree711ae265a238973e11c803a6f8fcd47694bcfc78 /weed/mount/filehandle_read.go
parentfef9c6a520092fce8ea0ab9acfadf7bca882b5fe (diff)
downloadseaweedfs-3a75d7f7aaaf7d7102f6ead38a221f60cbec5652.tar.xz
seaweedfs-3a75d7f7aaaf7d7102f6ead38a221f60cbec5652.zip
Implement copy_file_range syscall in FUSE (#3475)
See the man page of copy_file_range: https://man7.org/linux/man-pages/man2/copy_file_range.2.html
Diffstat (limited to 'weed/mount/filehandle_read.go')
-rw-r--r--weed/mount/filehandle_read.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/weed/mount/filehandle_read.go b/weed/mount/filehandle_read.go
index 78f3ff5a9..d0192e73e 100644
--- a/weed/mount/filehandle_read.go
+++ b/weed/mount/filehandle_read.go
@@ -3,10 +3,11 @@ package mount
import (
"context"
"fmt"
+ "io"
+
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/glog"
"github.com/seaweedfs/seaweedfs/weed/pb/filer_pb"
- "io"
)
func (fh *FileHandle) lockForRead(startOffset int64, size int) {
@@ -25,9 +26,6 @@ func (fh *FileHandle) readFromChunks(buff []byte, offset int64) (int64, error) {
fileFullPath := fh.FullPath()
- fh.entryLock.Lock()
- defer fh.entryLock.Unlock()
-
entry := fh.entry
if entry == nil {
return 0, io.EOF