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)
commit579a00e6f8688be834a2dc3cdcb3a9473d3331dd
tree6cb65e986906fe9176ff54715fdb4305a39286f1
parent6de3827289c5c2c4343e32bc37f047fca5524e16
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