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
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package mount
|
||||
|
||||
import (
|
||||
"github.com/hanwen/go-fuse/v2/fuse"
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
"io"
|
||||
|
||||
"github.com/hanwen/go-fuse/v2/fuse"
|
||||
|
||||
"github.com/seaweedfs/seaweedfs/weed/glog"
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -37,6 +39,9 @@ func (wfs *WFS) Read(cancel <-chan struct{}, in *fuse.ReadIn, buff []byte) (fuse
|
||||
return nil, fuse.ENOENT
|
||||
}
|
||||
|
||||
fh.entryLock.Lock()
|
||||
defer fh.entryLock.Unlock()
|
||||
|
||||
offset := int64(in.Offset)
|
||||
fh.lockForRead(offset, len(buff))
|
||||
defer fh.unlockForRead(offset, len(buff))
|
||||
|
||||
Reference in New Issue
Block a user