]> git.proxmox.com Git - qemu.git/commit - block.c
block: Change bdrv_commit to handle multiple sectors at once
authorKevin Wolf <kwolf@redhat.com>
Fri, 16 Jul 2010 15:17:01 +0000 (17:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 3 Aug 2010 13:57:22 +0000 (15:57 +0200)
commit8a4266144ebffceb8fda2a5feb03d23c535923d4
tree6cb65e986906fe9176ff54715fdb4305a39286f1
parent5933e8a96ab9c59cb6b6c80c9db385364a68c959
block: Change bdrv_commit to handle multiple sectors at once

bdrv_commit copies the image to its backing file sector by sector, which
is (surprise!) relatively slow. Let's take a larger buffer and handle more
sectors at once if possible.

With a 1G qcow2 file, this brought the time bdrv_commit takes down from
5:06 min to 1:14 min for me.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c