qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/16] block: explicitly acquire aiocontext in t


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 10/16] block: explicitly acquire aiocontext in timers that need it
Date: Wed, 18 Jan 2017 15:43:10 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Fri, Jan 13, 2017 at 02:17:25PM +0100, Paolo Bonzini wrote:
> diff --git a/block/null.c b/block/null.c
> index b300390..356209a 100644
> --- a/block/null.c
> +++ b/block/null.c
> @@ -141,7 +141,11 @@ static void null_bh_cb(void *opaque)
>  static void null_timer_cb(void *opaque)
>  {
>      NullAIOCB *acb = opaque;
> +    AioContext *ctx = bdrv_get_aio_context(acb->common.bs);
> +
> +    aio_context_acquire(ctx);
>      acb->common.cb(acb->common.opaque, 0);
> +    aio_context_release(ctx);
>      timer_deinit(&acb->timer);
>      qemu_aio_unref(acb);

Is qemu_aio_unref() thread-safe?

Attachment: signature.asc
Description: PGP signature


reply via email to

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