diff options
author | yuchenlin <yuchenlin@synology.com> | 2018-09-13 16:29:52 +0800 |
---|---|---|
committer | Fam Zheng <famz@redhat.com> | 2018-09-26 10:47:18 +0800 |
commit | 51b3c6b73acae1e3fd3c7d441fc86dd17356695f (patch) | |
tree | b361ef7669c1a9ebcdf2dd9695a280c15d7e8949 /hw | |
parent | b33bd859d12e70757bb2632573c3a1662d967dbf (diff) | |
download | qemu-51b3c6b73acae1e3fd3c7d441fc86dd17356695f.zip qemu-51b3c6b73acae1e3fd3c7d441fc86dd17356695f.tar.gz qemu-51b3c6b73acae1e3fd3c7d441fc86dd17356695f.tar.bz2 |
vmdk: align end of file to a sector boundary
There is a rare case which the size of last compressed cluster
is larger than the cluster size, which will cause the file is
not aligned at the sector boundary.
There are three reasons to do it. First, if vmdk doesn't align at
the sector boundary, there may be many undefined behaviors,
such as, in vbox it will show VMDK: Compressed image is corrupted
'syno-vm-disk1.vmdk' (VERR_ZIP_CORRUPTED) when we try to import an
ova with unaligned vmdk. Second, all the cluster_sector is aligned
to sector, the last one should be like this, too. Third, it ease
reading with sector based I/Os.
Signed-off-by: yuchenlin <yuchenlin@synology.com>
Message-Id: <20180913082952.3675-1-yuchenlin@synology.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'hw')
0 files changed, 0 insertions, 0 deletions