On 07.08.20 12:03, Swapnil Ingle wrote: > block/vhdx uses qemu block layer where sector size is always 512 bytes. > This may have issues with 4K logical sector sized vhdx image. > > For e.g qemu-img convert on such images fails with following assert: > > $qemu-img convert -f vhdx -O raw 4KTest1.vhdx test.raw > qemu-img: util/iov.c:388: qiov_slice: Assertion `offset + len <= > qiov->size' failed. > Aborted > > This patch adds an check to return ENOTSUP for vhdx images which > have logical sector size other than 512 bytes. > > Signed-off-by: Swapnil Ingle <[email protected]> > --- > v2: Fixed commit message, suggested by Philippe Mathieu-Daude > --- > block/vhdx.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-)
Oh, sorry, yes. Thanks! Applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commits/branch/block Max (Further information for others: The vhdx code assumes all over the place that the vhdx sectors have the same size as “block layer sectors”. Fixing this seems by no means trivial. I assume images with 4k sectors have never worked, so this commit doesn’t remove support, it just makes the vhdx driver safely exit before it can do something wrong.)
