Re: [Qemu-devel] [RFC PATCH 09/16] qcow2: Move COW and L2 update into own coroutine

2012-09-18 Thread Paolo Bonzini
Il 18/09/2012 16:44, Kevin Wolf ha scritto: >>> +qemu_co_mutex_unlock(&s->lock); >>> >> +qemu_co_rwlock_rdlock(&s->l2meta_flush); >> > >> > Should this lock be taken in process_l2meta? It's a bit easier to follow. > I'm pretty sure there was a reason, but it isn't obvious

Re: [Qemu-devel] [RFC PATCH 09/16] qcow2: Move COW and L2 update into own coroutine

2012-09-18 Thread Paolo Bonzini
Il 18/09/2012 13:40, Kevin Wolf ha scritto: > +qemu_co_mutex_unlock(&s->lock); > +qemu_co_rwlock_rdlock(&s->l2meta_flush); Should this lock be taken in process_l2meta? It's a bit easier to follow. Paolo > +l2meta->is_written = true; > +co = qemu_c

Re: [Qemu-devel] [RFC PATCH 09/16] qcow2: Move COW and L2 update into own coroutine

2012-09-18 Thread Kevin Wolf
Am 18.09.2012 16:24, schrieb Paolo Bonzini: > Il 18/09/2012 13:40, Kevin Wolf ha scritto: >> +qemu_co_mutex_unlock(&s->lock); >> +qemu_co_rwlock_rdlock(&s->l2meta_flush); > > Should this lock be taken in process_l2meta? It's a bit easier to follow. I'm pretty sure there w

[Qemu-devel] [RFC PATCH 09/16] qcow2: Move COW and L2 update into own coroutine

2012-09-18 Thread Kevin Wolf
This creates a separate coroutine for processing the COW and the L2 table update of allocating requests. The request itself can then complete while the second part is still being processed. We need a qemu_aio_flush() hook in order to ensure that these coroutines for the second part aren't still ru