Note the bounded display-count over-count on a stalled read retry

This commit is contained in:
Matthew Jackson
2026-08-02 16:18:19 -07:00
parent 841aa1a1c6
commit 5c8b4dc7c5
+6 -3
View File
@@ -605,9 +605,12 @@ pub(crate) fn probe_and_set_forced<S: SectorSource + ?Sized>(
// Bounded retries are what keep a source that never yields a unit // Bounded retries are what keep a source that never yields a unit
// (including one that claims sectors and returns none) from // (including one that claims sectors and returns none) from
// spinning here for ever. A retry that re-serves the same bytes // spinning here for ever. A retry that re-serves the same bytes
// feeds them twice; the evidence a [`ForcedTracker`] keeps is // feeds them twice: the BOOLEAN evidence is monotone (observed /
// monotone (observed / saw-a-non-forced-set), so a repeat cannot // saw-a-non-forced-set / saw-a-forced-set), so a repeat cannot
// change a verdict. // change it, and the display COUNT can over-count by at most
// [`STALL_RETRY_LIMIT`] repeats of a sub-unit (< 6 KB) read —
// too little to move the shape comparison the demotion gate
// makes, which is against the busiest track on the disc.
for pes in demux.feed(&buf[..n.min(want)]) { for pes in demux.feed(&buf[..n.min(want)]) {
if let (Some(parser), Some(tracker)) = if let (Some(parser), Some(tracker)) =
(parsers.get_mut(&pes.pid), trackers.get_mut(&pes.pid)) (parsers.get_mut(&pes.pid), trackers.get_mut(&pes.pid))