Skip to content

Commit

Permalink
Fix the newly added test
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalif committed May 30, 2024
1 parent 9a34bca commit 4e55667
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ func (inode *Inode) loadFromServer(readRanges []Range, readAheadSize uint64, ign
// Add readahead & merge adjacent requests
readRanges = mergeRA(readRanges, readAheadSize, inode.fs.flags.ReadMergeKB*1024)
last := &readRanges[len(readRanges)-1]
if last.End > inode.Attributes.Size {
last.End = inode.Attributes.Size
if last.End > inode.knownSize {
last.End = inode.knownSize
}
// Split very large requests into smaller chunks to read in parallel
readRanges = splitRA(readRanges, inode.fs.flags.ReadAheadParallelKB*1024)
Expand Down

0 comments on commit 4e55667

Please sign in to comment.