Skip to content

Commit

Permalink
meta/tkv: fix kvMeta CopyFileRange #4122 (#4130)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengleng authored and davies committed Nov 24, 2023
1 parent 9e6aebb commit a7c4ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/meta/tkv.go
Original file line number Diff line number Diff line change
Expand Up @@ -1776,7 +1776,7 @@ func (m *kvMeta) CopyFileRange(ctx Context, fin Ino, offIn uint64, fout Ino, off
attr.Ctime = now.Unix()
attr.Ctimensec = uint32(now.Nanosecond())

vals := tx.scanRange(m.chunkKey(fin, uint32(offIn/ChunkSize)), m.chunkKey(fin, uint32(offIn+size/ChunkSize)+1))
vals := tx.scanRange(m.chunkKey(fin, uint32(offIn/ChunkSize)), m.chunkKey(fin, uint32((offIn+size)/ChunkSize)+1))
chunks := make(map[uint32][]*slice)
for indx := uint32(offIn / ChunkSize); indx <= uint32((offIn+size)/ChunkSize); indx++ {
if v, ok := vals[string(m.chunkKey(fin, indx))]; ok {
Expand Down

0 comments on commit a7c4ec3

Please sign in to comment.