qcow2: add compress threads

Do data compression in separate threads. This significantly improve
performance for qemu-img convert with -W (allow async writes) and -c
(compressed) options.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Vladimir Sementsov-Ogievskiy 2018-06-20 17:48:37 +03:00 committed by Kevin Wolf
parent 2714f13d69
commit ceb029cd6f
2 changed files with 64 additions and 1 deletions

View file

@ -326,6 +326,9 @@ typedef struct BDRVQcow2State {
* override) */
char *image_backing_file;
char *image_backing_format;
CoQueue compress_wait_queue;
int nb_compress_threads;
} BDRVQcow2State;
typedef struct Qcow2COWRegion {