Add bdrv_aio_multiwrite
authorKevin Wolf <kwolf@redhat.com>
Wed, 9 Sep 2009 15:53:37 +0000 (17:53 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 11 Sep 2009 15:18:06 +0000 (10:18 -0500)
commit5c72012156051ffc7be33921fbc39cc3693d7c25
treec54e3455975d74e8fefdfd349c9b7a854922abbf
parent4bfe75b0b437c7bd42d7723fed153da1fe353f23
Add bdrv_aio_multiwrite

One performance problem of qcow2 during the initial image growth are
sequential writes that are not cluster aligned. In this case, when a first
requests requires to allocate a new cluster but writes only to the first
couple of sectors in that cluster, the rest of the cluster is zeroed - just
to be overwritten by the following second request that fills up the cluster.

Let's try to merge sequential write requests to the same cluster, so we can
avoid to write the zero padding to the disk in the first place.

As a nice side effect, also other formats take advantage of dealing with less
and larger requests.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block.c
block.h
block_int.h
cutils.c
qemu-common.h