]> git.proxmox.com Git - mirror_qemu.git/commit - block/vmdk.c
vmdk: Fix next_cluster_sector for compressed write
authorRadoslav Gerganov <rgerganov@vmware.com>
Thu, 10 Sep 2015 07:53:14 +0000 (10:53 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 14 Sep 2015 14:51:37 +0000 (16:51 +0200)
commit3efffc3292d94271a15b1606b4a56adf6c6f04ed
tree4aeb3c382ee9739db8ee9eb595ea537ca44583db
parent097b500c2dff7addfcd5f4c8a111f6bfd0cb3977
vmdk: Fix next_cluster_sector for compressed write

When the VMDK is streamOptimized (or compressed), the
next_cluster_sector must not be incremented by a fixed number of
sectors. Instead of this, it must be rounded up to the next consecutive
sector. Fixing this results in much smaller compressed images.

Signed-off-by: Radoslav Gerganov <rgerganov@vmware.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vmdk.c