Skip to content

Commit

Permalink
fix: return the read sectors length when it reads the expansion part
Browse files Browse the repository at this point in the history
ref: longhorn/longhonr 6899

Signed-off-by: Jack Lin <[email protected]>
  • Loading branch information
ChanYiLin committed Jan 17, 2024
1 parent 3848d7d commit f95a5d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/replica/diff_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (d *diffDisk) read(target byte, buf []byte, startOffset int64, startSector

// May read the expanded part
if offset >= size {
return 0, nil
return int(bufLength), nil
}
var newBuf []byte
if bufLength > size-offset {
Expand Down

0 comments on commit f95a5d4

Please sign in to comment.