aboutsummaryrefslogtreecommitdiff
path: root/block/qcow2.h
diff options
context:
space:
mode:
authorAlberto Garcia <berto@igalia.com>2017-06-19 16:40:08 +0300
committerKevin Wolf <kwolf@redhat.com>2017-06-26 14:51:13 +0200
commitee22a9d86921310672aa8775489217f3e2f5e1c6 (patch)
tree8c2f02810e7f5954afdb65a64a9cb8f2504adfed /block/qcow2.h
parent86b862c431ae5effa80a095c9c989a5a9976ead1 (diff)
qcow2: Merge the writing of the COW regions with the guest data
If the guest tries to write data that results on the allocation of a new cluster, instead of writing the guest data first and then the data from the COW regions, write everything together using one single I/O operation. This can improve the write performance by 25% or more, depending on several factors such as the media type, the cluster size and the I/O request size. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.h')
-rw-r--r--block/qcow2.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/qcow2.h b/block/qcow2.h
index c26ee0a33d..87b15eb4aa 100644
--- a/block/qcow2.h
+++ b/block/qcow2.h
@@ -343,6 +343,13 @@ typedef struct QCowL2Meta
*/
Qcow2COWRegion cow_end;
+ /**
+ * The I/O vector with the data from the actual guest write request.
+ * If non-NULL, this is meant to be merged together with the data
+ * from @cow_start and @cow_end into one single write operation.
+ */
+ QEMUIOVector *data_qiov;
+
/** Pointer to next L2Meta of the same write request */
struct QCowL2Meta *next;