All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nir Soffer <nsoffer@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	qemu-block <qemu-block@nongnu.org>, Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure
Date: Wed, 15 Jul 2020 16:22:06 +0300	[thread overview]
Message-ID: <CAMRbyysaB5MDWGz7upg-O=N2vhQn4OUdZVsqeBothYBtZyy6ZA@mail.gmail.com> (raw)
In-Reply-To: <20200713165637.GH10318@linux.fritz.box>

On Mon, Jul 13, 2020 at 7:56 PM Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 13.07.2020 um 18:33 hat Nir Soffer geschrieben:
> > On Fri, Jul 10, 2020 at 5:22 PM Kevin Wolf <kwolf@redhat.com> wrote:
> > >
> > > Unaligned requests will automatically be aligned to bl.request_alignment
> > > and we don't want to extend requests to access space beyond the end of
> > > the image, so it's required that the image size is aligned.
> > >
> > > With write requests, this could cause assertion failures like this if
> > > RESIZE permissions weren't requested:
> > >
> > > qemu-img: block/io.c:1910: bdrv_co_write_req_prepare: Assertion `end_sector <= bs->total_sectors || child->perm & BLK_PERM_RESIZE' failed.
> > >
> > > This was e.g. triggered by qemu-img converting to a target image with 4k
> > > request alignment when the image was only aligned to 512 bytes, but not
> > > to 4k.
> >
> > Was it on NFS? Shouldn't this be fix by the next patch then?
>
> Patch 2 makes the problem go away for NFS because NFS doesn't even
> require the 4k alignment. But on storage that legitimately needs 4k
> alignment (or possibly other filesystems that are misdetected), you
> would still hit the same problem.

I want to add oVirt point of view on this. We enforce raw image
alignment of 4k on
file based storage, and 128m on block storage, so our raw images cannot have
this issue.

We have an issue with empty qcow2 images which are unaligned size, but we don't
create such images in normal flows.

Nir



  reply	other threads:[~2020-07-15 13:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10 14:21 [PATCH for-5.1 0/2] qemu-img convert: Fix abort with unaligned image size Kevin Wolf
2020-07-10 14:21 ` [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure Kevin Wolf
2020-07-10 14:37   ` Eric Blake
2020-07-13 11:19   ` Max Reitz
2020-07-13 11:52     ` Max Reitz
2020-07-13 14:29     ` Kevin Wolf
2020-07-14  9:56       ` Max Reitz
2020-07-14 11:08         ` Kevin Wolf
2020-07-14 16:22           ` Max Reitz
2020-07-15  9:20             ` Kevin Wolf
2020-07-13 16:33   ` Nir Soffer
2020-07-13 16:56     ` Kevin Wolf
2020-07-15 13:22       ` Nir Soffer [this message]
2020-07-15 13:42         ` Kevin Wolf
2020-07-15 14:03           ` Nir Soffer
2020-07-15 14:03         ` Daniel P. Berrangé
2020-07-10 14:21 ` [PATCH for-5.1 2/2] file-posix: Allow byte-aligned O_DIRECT with NFS Kevin Wolf
2020-07-10 14:39   ` Eric Blake
2020-07-13 16:29   ` Nir Soffer
2020-07-10 14:43 ` [PATCH for-5.1 0/2] qemu-img convert: Fix abort with unaligned image size no-reply

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='CAMRbyysaB5MDWGz7upg-O=N2vhQn4OUdZVsqeBothYBtZyy6ZA@mail.gmail.com' \
    --to=nsoffer@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.