[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v2 02/17] blockjob: Wake up BDS when job becomes

From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH v2 02/17] blockjob: Wake up BDS when job becomes idle
Date: Thu, 13 Sep 2018 16:31:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 13.09.18 14:52, Kevin Wolf wrote:
> In the context of draining a BDS, the .drained_poll callback of block
> jobs is called. If this returns true (i.e. there is still some activity
> pending), the drain operation may call aio_poll() with blocking=true to
> wait for completion.
> As soon as the pending activity is completed and the job finally arrives
> in a quiescent state (i.e. its coroutine either yields with busy=false
> or terminates), the block job must notify the aio_poll() loop to wake
> up, otherwise we get a deadlock if both are running in different
> threads.
> Signed-off-by: Kevin Wolf <address@hidden>
> Reviewed-by: Fam Zheng <address@hidden>
> ---
>  include/block/blockjob.h | 13 +++++++++++++
>  include/qemu/job.h       |  3 +++
>  blockjob.c               | 18 ++++++++++++++++++
>  job.c                    |  7 +++++++
>  4 files changed, 41 insertions(+)

Reviewed-by: Max Reitz <address@hidden>

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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