On Tue, 04/11 12:06, Kevin Wolf wrote:
> > tests/qemu-iotests/109.out | 10 +++++-----
>
> This one is curious. Why do we copy more data depending on how the job
> coroutine is reentered?
I did trace it and think the difference is not very important: on master, the
second iteration of the mirror_run loop gets a chance to run, and there we have:
s->common.len = s->common.offset +
(cnt + s->sectors_in_flight) * BDRV_SECTOR_SIZE;
E.g. in the mirror job of the first updated output, iter #1 has cnt = 128
and s->sectors_in_flight = 0; iter #2 has cnt = 0, s->sectors_in_flight = 2.
I think the reason is simply that co_queue_wakeup in bdrv_coroutine_enter subtly
changed how the mirror coroutine and bdrv_co_pwritev are ordered.
Fam