diff options
author | Alexander Motin <[email protected]> | 2024-04-09 19:14:04 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-04-19 10:13:38 -0700 |
commit | f4ce02ae42ab084306ebcfb6ec615acb9dc98db2 (patch) | |
tree | 83d68f649fd917b514afa0a2b59a12f913777b0b /module/zfs/dmu_zfetch.c | |
parent | 97d7228f427218cb701b4149c3f8f9d77e8c64e4 (diff) |
Small fix to prefetch ranges aggregation
When after #16022 adding new range we aggregate more than two
existing ranges, that should be very rare, only if several streams
overlap, we may need to zero not the last range, but some earlier.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #16072
Diffstat (limited to 'module/zfs/dmu_zfetch.c')
-rw-r--r-- | module/zfs/dmu_zfetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/module/zfs/dmu_zfetch.c b/module/zfs/dmu_zfetch.c index e26195176..3439f9bdd 100644 --- a/module/zfs/dmu_zfetch.c +++ b/module/zfs/dmu_zfetch.c @@ -418,8 +418,8 @@ dmu_zfetch_future(zstream_t *zs, uint64_t blkid, uint64_t nblks) zs->zs_ranges[f].start = zs->zs_ranges[l].start; zs->zs_ranges[f].end = zs->zs_ranges[l].end; } - zs->zs_ranges[ZFETCH_RANGES - 1].start = 0; - zs->zs_ranges[ZFETCH_RANGES - 1].end = 0; + zs->zs_ranges[f].start = 0; + zs->zs_ranges[f].end = 0; } } else if (i < ZFETCH_RANGES) { /* Got no intersecting ranges, insert new one. */ |