From 40b4f539678266160badd5ac4afa9833f9089154 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 9 Sep 2009 17:53:37 +0200 Subject: 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 Signed-off-by: Anthony Liguori --- qemu-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'qemu-common.h') diff --git a/qemu-common.h b/qemu-common.h index 74ac88fba0..f3cfb683ea 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -223,6 +223,7 @@ typedef struct QEMUIOVector { void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); +void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t size); void qemu_iovec_destroy(QEMUIOVector *qiov); void qemu_iovec_reset(QEMUIOVector *qiov); void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf); -- cgit v1.2.1