Skip to content

Commit 34cc532

Browse files
committed
Fix the newly added test
1 parent bb7ebc6 commit 34cc532

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ func (inode *Inode) loadFromServer(readRanges []Range, readAheadSize uint64, ign
219219
// Add readahead & merge adjacent requests
220220
readRanges = mergeRA(readRanges, readAheadSize, inode.fs.flags.ReadMergeKB*1024)
221221
last := &readRanges[len(readRanges)-1]
222-
if last.End > inode.Attributes.Size {
223-
last.End = inode.Attributes.Size
222+
if last.End > inode.knownSize {
223+
last.End = inode.knownSize
224224
}
225225
// Split very large requests into smaller chunks to read in parallel
226226
readRanges = splitRA(readRanges, inode.fs.flags.ReadAheadParallelKB*1024)

0 commit comments

Comments
 (0)