diff --git a/drivers/cube/cubelinux_store.rs b/drivers/cube/cubelinux_store.rs index 983553b2a..bb9106a4d 100644 --- a/drivers/cube/cubelinux_store.rs +++ b/drivers/cube/cubelinux_store.rs @@ -2877,7 +2877,12 @@ unsafe fn v3_range( out, written: 0, returned: 0, - seen: cursor, + // `seen` is what skips the `cursor` records already returned, and it must start at 0: this + // path re-seeks to the span's foot every batch (there is no `at = first + cursor` here, and + // there cannot be — a span holds records that are *not* returned, so the index position of + // the cursor-th match is not arithmetic), so `offer` is the only thing that counts. Starting + // it at `cursor` would re-serve the span from its foot forever. + seen: 0, cursor, too_big: 0, }; @@ -3206,7 +3211,9 @@ pub unsafe extern "C" fn cubelinux_kernel_range( out, written: 0, returned: 0, - seen: cursor, + // Same reason as the v3 path: this re-walks the space from its start every batch, and the + // cursor's skip is `offer`'s own `seen`, which counts the matches and starts at 0. + seen: 0, cursor, too_big: 0, };