[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] mirror: hold aio_context before bd
From: |
Fam Zheng |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] mirror: hold aio_context before bdrv_drain |
Date: |
Wed, 1 Apr 2015 16:19:32 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, 04/01 12:42, Bin Wu wrote:
> From: Bin Wu <address@hidden>
What's the issue are you fixing? I think the coroutine already is running in
the AioContext of bs.
Fam
>
> Signed-off-by: Bin Wu <address@hidden>
> ---
> block/mirror.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/block/mirror.c b/block/mirror.c
> index 4056164..08372df 100644
> --- a/block/mirror.c
> +++ b/block/mirror.c
> @@ -530,7 +530,9 @@ static void coroutine_fn mirror_run(void *opaque)
> * mirror_populate runs.
> */
> trace_mirror_before_drain(s, cnt);
> + aio_context_acquire(bdrv_get_aio_context(bs));
> bdrv_drain(bs);
> + aio_context_release(bdrv_get_aio_context(bs));
> cnt = bdrv_get_dirty_count(bs, s->dirty_bitmap);
> }
>
> --
> 1.7.12.4
>
>
>