On 14/06/2016 20:17, Stefan Hajnoczi wrote:
> +/* There is no matching mirror_resume() because mirror_run() will begin
> + * iterating again when the job is resumed.
> + */
> +static void mirror_pause(BlockJob *job)
> +{
> +    MirrorBlockJob *s = container_of(job, MirrorBlockJob, common);
> +
> +    while (s->in_flight > 0) {
> +        aio_poll(blk_get_aio_context(job->blk), true);
> +    }

This is calling aio_poll from a coroutine, which is ugly -- see Fam's
recent introduction of bdrv_co_drain.  I think this should call
mirror_drain instead.

Paolo

> +}
> +

Reply via email to