qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 4/5] mirror: follow AioContext change gracefu


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v4 4/5] mirror: follow AioContext change gracefully
Date: Wed, 15 Jun 2016 10:57:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0


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

[Prev in Thread] Current Thread [Next in Thread]