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
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);
>> +}
>
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
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.