]> git.proxmox.com Git - mirror_qemu.git/commit - block/qcow2.c
qcow2: Merge the writing of the COW regions with the guest data
authorAlberto Garcia <berto@igalia.com>
Mon, 19 Jun 2017 13:40:08 +0000 (16:40 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:13 +0000 (14:51 +0200)
commitee22a9d86921310672aa8775489217f3e2f5e1c6
tree8c2f02810e7f5954afdb65a64a9cb8f2504adfed
parent86b862c431ae5effa80a095c9c989a5a9976ead1
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>
block/qcow2-cluster.c
block/qcow2.c
block/qcow2.h