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

2015-12-18 Thread Kevin Wolf
[ Cc: qemu-block ] Am 16.12.2015 um 19:33 hat Paolo Bonzini geschrieben: > When called from a coroutine, bdrv_ioctl must be asynchronous just like > e.g. bdrv_flush. The code was incorrectly making it synchronous, fix > it. > > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch.

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

2015-12-17 Thread Fam Zheng
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); > > > > > > whi

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

2015-12-17 Thread Paolo Bonzini
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

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

2015-12-17 Thread Fam Zheng
On Thu, 12/17 09:44, Paolo Bonzini wrote: > > > On 17/12/2015 01:59, Fam Zheng wrote: > > On Wed, 12/16 19:33, Paolo Bonzini wrote: > >> When called from a coroutine, bdrv_ioctl must be asynchronous just like > >> e.g. bdrv_flush. The code was incorrectly making it synchronous, fix > >> it. > >>

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

2015-12-17 Thread Paolo Bonzini
On 17/12/2015 01:59, Fam Zheng wrote: > On Wed, 12/16 19:33, Paolo Bonzini wrote: >> When called from a coroutine, bdrv_ioctl must be asynchronous just like >> e.g. bdrv_flush. The code was incorrectly making it synchronous, fix >> it. >> >> Signed-off-by: Paolo Bonzini >> --- >> Fam, a

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

2015-12-16 Thread Fam Zheng
On Wed, 12/16 19:33, Paolo Bonzini wrote: > When called from a coroutine, bdrv_ioctl must be asynchronous just like > e.g. bdrv_flush. The code was incorrectly making it synchronous, fix > it. > > Signed-off-by: Paolo Bonzini > --- > Fam, any reason why you did it this way? I don't see

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

2015-12-16 Thread Paolo Bonzini
When called from a coroutine, bdrv_ioctl must be asynchronous just like e.g. bdrv_flush. The code was incorrectly making it synchronous, fix it. Signed-off-by: Paolo Bonzini --- Fam, any reason why you did it this way? I don't see any coroutine caller, but it doesn't make much s