summaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2019-09-16 20:53:24 +0300
committerMax Reitz <mreitz@redhat.com>2019-10-10 10:56:17 +0200
commitd710cf575ad5fb3ab329204620de45bfe50caa53 (patch)
treed5928b6caa17ae1a2c53abad4fb9e5183d7b83c5 /block/qcow2.h
parent6aa7a2631b88412cc85aeb67c1e188517c54fa5e (diff)
downloadqemu-d710cf575ad5fb3ab329204620de45bfe50caa53.zip
block/qcow2: introduce parallel subrequest handling in read and write
It improves performance for fragmented qcow2 images. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190916175324.18478-6-vsementsov@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index a488d761ff..f51f478e34 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -65,6 +65,9 @@
#define QCOW2_MAX_BITMAPS 65535
#define QCOW2_MAX_BITMAP_DIRECTORY_SIZE (1024 * QCOW2_MAX_BITMAPS)
+/* Maximum of parallel sub-request per guest request */
+#define QCOW2_MAX_WORKERS 8
+
/* indicate that the refcount of the referenced cluster is exactly one. */
#define QCOW_OFLAG_COPIED (1ULL << 63)
/* indicate that the cluster is compressed (they never have the copied flag) */