mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
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 <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16072
This commit is contained in:
parent
162cc80b81
commit
9e63631dea
@ -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].start = zs->zs_ranges[l].start;
|
||||||
zs->zs_ranges[f].end = zs->zs_ranges[l].end;
|
zs->zs_ranges[f].end = zs->zs_ranges[l].end;
|
||||||
}
|
}
|
||||||
zs->zs_ranges[ZFETCH_RANGES - 1].start = 0;
|
zs->zs_ranges[f].start = 0;
|
||||||
zs->zs_ranges[ZFETCH_RANGES - 1].end = 0;
|
zs->zs_ranges[f].end = 0;
|
||||||
}
|
}
|
||||||
} else if (i < ZFETCH_RANGES) {
|
} else if (i < ZFETCH_RANGES) {
|
||||||
/* Got no intersecting ranges, insert new one. */
|
/* Got no intersecting ranges, insert new one. */
|
||||||
|
Loading…
Reference in New Issue
Block a user