Re: [PATCH v3 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-11-02 Thread Kevin Wolf
Am 01.11.2023 um 18:51 hat Michael Tokarev geschrieben:
> 01.11.2023 18:38, Andrey Drobyshev wrote:
> > Hi Michael,
> > 
> > Since this series is already merged in master, I'm not sure whether it's
> > necessary to forward this particular patch to qemu-stable, or it should
> > rather be cherry-picked to -stable by one of the block maintainers.
> 
> It's been my job lately to pick something up for stable, once it gets
> applied to master.  But it is usually the patch author or subsystem
> maintainer to mark a change as a candidate for -stable, - I can't decide
> about every change out there, since I don't have enough expertise in
> every area.  You Cc: qemu-stable@ and I pick it up.  I do look at stuff
> being applied to master from time to time though, and ask if I see
> something which might be worth to pick, as in this case.

I didn't even think about it for this patch, but yes, it sounds like a
candidate for stable to me.

> BTW, there's another change in this series which might be a good candidate
> too, - "qemu-img: rebase: use backing files' BlockBackend for buffer
> alignment".  Once again, I dunno if it's worth to pick it up or not,
> it's basically up to you to decide.  Basically, you understand much
> better what the implications are and if the change fixes actual bug.

It's an optimisation, I wouldn't pick that one.

Kevin




Re: [PATCH v3 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-11-01 Thread Michael Tokarev

01.11.2023 18:38, Andrey Drobyshev wrote:

Hi Michael,

Since this series is already merged in master, I'm not sure whether it's
necessary to forward this particular patch to qemu-stable, or it should
rather be cherry-picked to -stable by one of the block maintainers.


It's been my job lately to pick something up for stable, once it gets
applied to master.  But it is usually the patch author or subsystem
maintainer to mark a change as a candidate for -stable, - I can't decide
about every change out there, since I don't have enough expertise in
every area.  You Cc: qemu-stable@ and I pick it up.  I do look at stuff
being applied to master from time to time though, and ask if I see
something which might be worth to pick, as in this case.

BTW, there's another change in this series which might be a good candidate
too, - "qemu-img: rebase: use backing files' BlockBackend for buffer
alignment".  Once again, I dunno if it's worth to pick it up or not,
it's basically up to you to decide.  Basically, you understand much
better what the implications are and if the change fixes actual bug.

/mjt



Re: [PATCH v3 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-11-01 Thread Andrey Drobyshev
On 11/1/23 11:50, Michael Tokarev wrote:
> 19.09.2023 19:57, Andrey Drobyshev via wrote:
>> 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 
>> Reviewed-by: Denis V. Lunev 
>> Reviewed-by: Hanna Czenczek 
> 
> Is this change not for -stable anymore?  First version of this patch has
> been
> Cc'd to stable, this one is not.
> 
> Thanks,
> 
> /mjt

Hi Michael,

Since this series is already merged in master, I'm not sure whether it's
necessary to forward this particular patch to qemu-stable, or it should
rather be cherry-picked to -stable by one of the block maintainers.

Kevin, maybe you can clarify?

Andrey



Re: [PATCH v3 1/8] qemu-img: rebase: stop when reaching EOF of old backing file

2023-11-01 Thread Michael Tokarev

19.09.2023 19:57, Andrey Drobyshev via wrote:

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 
Reviewed-by: Denis V. Lunev 
Reviewed-by: Hanna Czenczek 


Is this change not for -stable anymore?  First version of this patch has been
Cc'd to stable, this one is not.

Thanks,

/mjt