qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block: fix bdrv_ioctl called from coroutine


From: Fam Zheng
Subject: Re: [Qemu-devel] [PATCH] block: fix bdrv_ioctl called from coroutine
Date: Fri, 18 Dec 2015 09:17:16 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, 12/17 13:51, Paolo Bonzini wrote:
> 
> 
> On 17/12/2015 13:33, Fam Zheng wrote:
> > > In the coroutine case, the yield is hidden in the drivers, and it may or
> > > may not happen.  For example, qcow2_co_flush_to_os starts with
> > > 
> > >     qemu_co_mutex_lock(&s->lock);
> > > 
> > > which can yield.
> > 
> > bdrv_ioctl, on the contrary, is emulated with .bdrv_aio_ioctl, so it always
> > yields (unless -ENOTSUP), that's why I think aio_poll() is necessary in both
> > branches.
> 
> But why should it yield, if called in coroutine context?  bdrv_flush
> doesn't yield if emulated with .bdrv_aio_flush *and* called in coroutine
> context.  bdrv_ioctl should do the same, I think.
> 

Looking at bdrv_flush again I see what you mean. Thanks for explaining!

Reviewed-by: Fam Zheng <address@hidden>



reply via email to

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