mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
io::read/write sliced buf using free_sectors * SECTOR_SIZE, a hardcoded 512-byte constant, instead of the file's real logical sector size ([MS-VHDX] allows 512 or 4,096). On a 4096-byte-sector image, only the first 512 bytes of each sector were transferred while the full 4096 was reported as done. Use sector.free_bytes instead. Signed-off-by: Alexander Lvov <alexander.lvov.git@gmail.com>