diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-07 17:22:19 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-07 17:22:19 +0000 |
commit | ff4b91c2f7e51dab148aba4bf43c2f39f219e495 (patch) | |
tree | d3efd92ba3a27a85f4490ffcba7cbfba2fad4614 /qemu-doc.texi | |
parent | ab5ccbd65de369d34f7bf2996530876790efef43 (diff) | |
download | qemu-ff4b91c2f7e51dab148aba4bf43c2f39f219e495.tar.gz qemu-ff4b91c2f7e51dab148aba4bf43c2f39f219e495.tar.bz2 qemu-ff4b91c2f7e51dab148aba4bf43c2f39f219e495.zip |
qcow2: Fix cluster allocation (Kevin Wolf)
When allocating multiple clusters at once, the qcow2 implementation
tries to find as many physically contiguous clusters as possible to
allow larger writes. This search includes allocated clusters which are
in the right place and still free clusters. If the range to allocate
spans clusters in patterns like "10 allocated, then 10 free, then again
10 allocated" it is only checked that the chunks of allocated clusters
are contiguous for themselves.
However, what is actually needed is to have _all_ allocated clusters
contiguous, starting at the first cluster of the allocation and spanning
multiple such chunks. This patch changes the check so that each offset
is not compared to the offset of the first cluster in its own chunk but
to the first cluster in the whole allocation.
I haven't seen it happen, but without this fix data corruption on qcow2
images is possible.
Signed-off-by: Kevin Wolf <kwolf@suse.de>
Acked-by: Gleb Natapov <gleb@redhat.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6213 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'qemu-doc.texi')
0 files changed, 0 insertions, 0 deletions