diff options
| author | wusong <75450248+wusongANKANG@users.noreply.github.com> | 2023-07-03 23:33:34 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-03 08:33:34 -0700 |
| commit | c44a6552d277ad19ba62f94083a98e2eb428de4b (patch) | |
| tree | 21170a16c53321a1c8e05340e692bde93bf0a2bd | |
| parent | f0d3c874b66282c1a9f825ba6731d8db628b3054 (diff) | |
| download | seaweedfs-c44a6552d277ad19ba62f94083a98e2eb428de4b.tar.xz seaweedfs-c44a6552d277ad19ba62f94083a98e2eb428de4b.zip | |
Fix buff use (#4628)
| -rw-r--r-- | weed/mount/weedfs_file_read.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/mount/weedfs_file_read.go b/weed/mount/weedfs_file_read.go index 95377d9e9..11ff07641 100644 --- a/weed/mount/weedfs_file_read.go +++ b/weed/mount/weedfs_file_read.go @@ -58,13 +58,13 @@ func (wfs *WFS) Read(cancel <-chan struct{}, in *fuse.ReadIn, buff []byte) (fuse if bytes.Compare(mirrorData, buff[:totalRead]) != 0 { againBuff := make([]byte, len(buff)) - againRead, _ := readDataByFileHandle(buff, fh, offset) + againRead, _ := readDataByFileHandle(againBuff, fh, offset) againCorrect := bytes.Compare(mirrorData, againBuff[:againRead]) == 0 againSame := bytes.Compare(buff[:totalRead], againBuff[:againRead]) == 0 fmt.Printf("\ncompare %v [%d,%d) size:%d againSame:%v againCorrect:%v\n", fh.mirrorFile.Name(), offset, offset+totalRead, totalRead, againSame, againCorrect) //fmt.Printf("read mirrow data: %v\n", mirrorData) - //fmt.Printf("read actual data: %v\n", buff[:totalRead]) + //fmt.Printf("read actual data: %v\n", againBuff[:totalRead]) } } |
