[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid asser
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure |
Date: |
Wed, 15 Jul 2020 15:03:19 +0100 |
User-agent: |
Mutt/1.14.5 (2020-06-23) |
On Wed, Jul 15, 2020 at 04:22:06PM +0300, Nir Soffer wrote:
> 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.
OpenStack should have minimium alignment of 1 GB for image sizes, so
this change is also no trouble for it.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, (continued)
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Kevin Wolf, 2020/07/13
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Max Reitz, 2020/07/14
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Kevin Wolf, 2020/07/14
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Max Reitz, 2020/07/14
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Kevin Wolf, 2020/07/15
Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Nir Soffer, 2020/07/13
Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure,
Daniel P . Berrangé <=
[PATCH for-5.1 2/2] file-posix: Allow byte-aligned O_DIRECT with NFS, Kevin Wolf, 2020/07/10
Re: [PATCH for-5.1 0/2] qemu-img convert: Fix abort with unaligned image size, no-reply, 2020/07/10