Skip to contentSkip to conversation

vmdk: Fix next_cluster_sector for compressed write

PATCH Kevin Wolf 1 participant 1 message Sep 10, 2015 4 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

Kevin Wolf

author Applied
#4 lore raw

Am 10.09.2015 um 10:58 hat Fam Zheng geschrieben:

Quoted 20 lines · Radoslav Gerganov
Quoted 19 lines · Fam Zheng
Quoted 6 lines · Radoslav Gerganov
Quoted 5 lines

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.

Quoted 6 lines
Quoted 1 line

Is this patch enough to produce a valid streamOptimized image? Because I remember there were reports on some other issues with footer or grain markers.

Fam

The VMDK spec says that each marker and its associated block must begin on sector boundary which is true before and after my patch. However, with my patch we don't put empty sectors when we achieve good compression for the current cluster but start the next cluster on the next consecutive sector.

Quoted 6 lines
Quoted 2 lines

I have also verified that images produced with my patch can be booted in VMware Workstation.

Thanks, the change looks good to me.

Thanks, applied to the block branch.

Radoslav, for your next patch please remember to always keep qemu-devel CCed, even if you're sending the patch to a more specific mailing list. I'm adding it to this mail so that people who aren't subscribed to qemu-block have a chance to notice the patch.

Kevin