Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-09-04 Thread Stefan Hajnoczi
On Thu, Aug 29, 2013 at 01:43:02PM +0100, Charlie Shepherd wrote: > On 29/08/2013 13:33, Stefan Hajnoczi wrote: > >On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote: > >>The previous patch convert all .bdrv_open functions to run from a coroutine > >>context. However > >>qcow2's open

Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-08-29 Thread Charlie Shepherd
On 29/08/2013 13:33, Stefan Hajnoczi wrote: On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote: The previous patch convert all .bdrv_open functions to run from a coroutine context. However qcow2's open method is also called from qcow2_invalidate_cache. bdrv_invalidate_cache is ma

Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-08-29 Thread Stefan Hajnoczi
On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote: > The previous patch convert all .bdrv_open functions to run from a coroutine > context. However > qcow2's open method is also called from qcow2_invalidate_cache. > bdrv_invalidate_cache is mainly > called by migration.c, which doe

Re: [Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-08-29 Thread Stefan Hajnoczi
On Fri, Aug 09, 2013 at 07:43:55PM +0200, Charlie Shepherd wrote: > +static int qcow2_open(BlockDriverState *bs, QDict *options, int flags) > +{ > +Coroutine *co; > +struct QOpenCo qo = { > +.bs = bs, > +.options = options, > +.flags = flags, > +.ret = NOT_DO

[Qemu-devel] [RFC v2 05/15] Make qcow2_open synchronous

2013-08-09 Thread Charlie Shepherd
The previous patch convert all .bdrv_open functions to run from a coroutine context. However qcow2's open method is also called from qcow2_invalidate_cache. bdrv_invalidate_cache is mainly called by migration.c, which doesn't run in coroutine context, so rather than propagating coroutine_fn anno