From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Swapnil Ingle <swapnil.ingle@nutanix.com>, qemu-devel@nongnu.org
Cc: Jeff Cody <codyprime@gmail.com>, Kevin Wolf <kwolf@redhat.com>,
"open list:VHDX" <qemu-block@nongnu.org>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH] block/vhdx: Support vhdx image only with 512 bytes logical sector size
Date: Thu, 6 Aug 2020 09:06:50 +0200 [thread overview]
Message-ID: <e867e590-83e8-8925-d02c-b79c40048d7d@redhat.com> (raw)
In-Reply-To: <1596663040-172084-1-git-send-email-swapnil.ingle@nutanix.com>
On 8/5/20 11:30 PM, Swapnil Ingle wrote:
> block/vhdx uses qemu block layer where sector size is always 512 byte.
"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
> has logical sector size other than 512 bytes.
Probably "which have".
>
> Signed-off-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
> ---
> block/vhdx.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 791eb90..356ec4c 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -816,9 +816,9 @@ static int vhdx_parse_metadata(BlockDriverState *bs, BDRVVHDXState *s)
> goto exit;
> }
>
> - /* only 2 supported sector sizes */
> - if (s->logical_sector_size != 512 && s->logical_sector_size != 4096) {
> - ret = -EINVAL;
> + /* Currently we only support 512 */
> + if (s->logical_sector_size != 512) {
> + ret = -ENOTSUP;
> goto exit;
> }
>
>
prev parent reply other threads:[~2020-08-06 12:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-05 21:30 [PATCH] block/vhdx: Support vhdx image only with 512 bytes logical sector size Swapnil Ingle
2020-08-06 7:06 ` Philippe Mathieu-Daudé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e867e590-83e8-8925-d02c-b79c40048d7d@redhat.com \
--to=philmd@redhat.com \
--cc=codyprime@gmail.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=swapnil.ingle@nutanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).