Skip to content

Commit 0b65542

Browse files
committed
Measure max indirect prefetch distance from data prefetch.
This removes dependincy between data and metadata prefetch distance tunables, that previously allowed data prefetch go beyond metadata, that made no sense and also caused stream reference counting problem. Signed-off-by: Alexander Motin <[email protected]>
1 parent 7163bf2 commit 0b65542

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

module/zfs/dmu_zfetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ dmu_zfetch_prepare(zfetch_t *zf, uint64_t blkid, uint64_t nblks,
392392
* (i.e. the amount read now + the amount of data prefetched now).
393393
*/
394394
pf_ahead_blks = zs->zs_ipf_blkid - blkid + nblks + pf_nblks;
395-
max_blks = max_dist_blks - (ipf_start - end_of_access_blkid);
395+
max_blks = max_dist_blks - (ipf_start - zs->zs_pf_blkid);
396396
ipf_nblks = MIN(pf_ahead_blks, max_blks);
397397
zs->zs_ipf_blkid = ipf_start + ipf_nblks;
398398

0 commit comments

Comments
 (0)