[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
- [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, (continued)
- [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Kevin Wolf, 2020/07/10
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Eric Blake, 2020/07/10
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Max Reitz, 2020/07/13
- Re: [PATCH for-5.1 1/2] block: Require aligned image size to avoid assertion failure, Max Reitz, 2020/07/13
- 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é, 2020/07/15
[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