qemu-block
[Top][All Lists]
Advanced

[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: Kevin Wolf
Subject: Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure
Date: Mon, 13 Jul 2020 18:56:37 +0200

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.

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]