[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing
From: |
Andrey Drobyshev |
Subject: |
Re: [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file |
Date: |
Fri, 2 Jun 2023 13:47:24 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 |
On 6/2/23 00:18, Michael Tokarev wrote:
> 01.06.2023 22:28, Andrey Drobyshev via пишет:
>> In case when we're rebasing within one backing chain, and when target
>> image
>> is larger than old backing file, bdrv_is_allocated_above() ends up
>> setting
>> *pnum = 0. As a result, target offset isn't getting incremented, and we
>> get stuck in an infinite for loop. Let's detect this case and proceed
>> further down the loop body, as the offsets beyond the old backing size
>> need
>> to be explicitly zeroed.
>>
>> Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
>
> It looks like you forgot the Reviewed-by: Denis V. Lunev here and
> in the subsequent patch.
Yes, you're right, thanks for pointing that out.
>
> Should this be backported to -stable? Not that I've seen this issue,
> it's a quite specific and somewhat rare case..
I guess in the vast majority of cases the sizes of images within the
same backing chain are equal. But as long as it's legal to have them
unequal, a bug remains a bug.
>
> Thanks,
>
> /mjt
- [PATCH 6/6] iotests: add test 314 for "qemu-img rebase" with compression, (continued)
- [PATCH 6/6] iotests: add test 314 for "qemu-img rebase" with compression, Andrey Drobyshev, 2023/06/01
- [PATCH 3/6] qemu-img: rebase: use backing files' BlockBackend for buffer alignment, Andrey Drobyshev, 2023/06/01
- [PATCH 5/6] qemu-img: add compression option to rebase subcommand, Andrey Drobyshev, 2023/06/01
- [PATCH 4/6] qemu-img: rebase: avoid unnecessary COW operations, Andrey Drobyshev, 2023/06/01
- [PATCH 1/6] qemu-img: rebase: stop when reaching EOF of old backing file, Andrey Drobyshev, 2023/06/01
- Re: [PATCH 0/6] qemu-img: rebase: add compression support, Denis V. Lunev, 2023/06/30