Re: [Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2019-01-04 Thread Alberto Garcia
On Fri 14 Dec 2018 09:51:12 AM CET, Vladimir Sementsov-Ogievskiy wrote: > 14.12.2018 2:28, Paolo Bonzini wrote: >> On 11/12/18 17:43, Vladimir Sementsov-Ogievskiy wrote: >>> +ThreadPool *pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); >>> + >>> +while (s->nb_threads >= QCOW2_MAX_THREA

Re: [Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2018-12-14 Thread Vladimir Sementsov-Ogievskiy
14.12.2018 2:28, Paolo Bonzini wrote: > On 11/12/18 17:43, Vladimir Sementsov-Ogievskiy wrote: >> +ThreadPool *pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); >> + >> +while (s->nb_threads >= QCOW2_MAX_THREADS) { >> +qemu_co_queue_wait(&s->thread_task_queue, NULL); >> +} >

Re: [Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2018-12-13 Thread Paolo Bonzini
On 11/12/18 17:43, Vladimir Sementsov-Ogievskiy wrote: > +ThreadPool *pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); > + > +while (s->nb_threads >= QCOW2_MAX_THREADS) { > +qemu_co_queue_wait(&s->thread_task_queue, NULL); > +} > + > +s->nb_threads++; > +ret = threa

[Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2018-12-11 Thread Vladimir Sementsov-Ogievskiy
Move generic part out of qcow2_co_do_compress, to reuse it for encryption and rename things that would be shared with encryption path. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.h | 4 ++-- block/qcow2-threads.c | 39 +++ block/qcow2.