[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logica
Re: [PATCH v2] block/vhdx: Support vhdx image only with 512 bytes logical sector size
Thu, 10 Sep 2020 18:19:37 +0200
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0
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.
> 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@example.com>
> 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:
(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.)