]> git.proxmox.com Git - qemu.git/commit - block/qcow2-cluster.c
qcow2: Gather clusters in a looping loop
authorKevin Wolf <kwolf@redhat.com>
Wed, 27 Mar 2013 10:43:49 +0000 (11:43 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 28 Mar 2013 10:52:44 +0000 (11:52 +0100)
commitecdd5333ab9ed3f2b848066aaaef02c027b25e36
tree40f544da54cd4aaaaf2d5c86f3f15766221de83c
parent2c3b32d25620c26e26fd590c198ec6d9cf91da57
qcow2: Gather clusters in a looping loop

Instead of just checking once in exactly this order if there are
dependendies, non-COW clusters and new allocation, this starts looping
around these. This way we can, for example, gather non-COW clusters after
new allocations as long as the host cluster offsets stay contiguous.

Once handle_dependencies() is extended so that COW areas of in-flight
allocations can be overwritten, this allows to continue with gathering
other clusters (we wouldn't be able to do that without this change
because we would have missed a possible second dependency in one of the
next clusters).

This means that in the typical sequential write case, we can combine the
COW overwrite of one cluster with the allocation of the next cluster as
soon as something like Delayed COW gets actually implemented. It is only
by avoiding splitting requests this way that Delayed COW actually starts
improving performance noticably.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2-cluster.c
tests/qemu-iotests/044.out