Skip to content
Commit 53cd79c1 authored by Fam Zheng's avatar Fam Zheng Committed by Michael Roth
Browse files

vmdk: Fix next_cluster_sector for compressed write



This fixes the bug introduced by commit c6ac36e1 (vmdk: Optimize cluster
allocation).

Sometimes, write_len could be larger than cluster size, because it
contains both data and marker.  We must advance next_cluster_sector in
this case, otherwise the image gets corrupted.

Cc: qemu-stable@nongnu.org
Reported-by: default avatarAntoni Villalonga <qemu-list@friki.cat>
Signed-off-by: default avatarFam Zheng <famz@redhat.com>
Reviewed-by: default avatarMax Reitz <mreitz@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
(cherry picked from commit 5e82a31e)
Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
parent 3dd15f3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment