qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [Qemu-devel] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al
Date: Thu, 28 Mar 2019 10:09:13 +0000

28.03.2019 13:04, Alberto Garcia wrote:
> On Thu 28 Mar 2019 10:45:51 AM CET, Vladimir Sementsov-Ogievskiy wrote:
>>> -    for (i = bs; i != base && i->backing; i = backing_bs(i)) {
>>> -        if (i->backing->frozen) {
>>> +    for (i = bs; i != base; i = backing_bs(i)) {
>>> +        if (i->backing && i->backing->frozen) {
>>
>> may be a bit more plain conversion would be just add assert(i == base)
>> after each loop, but I'm OK with this too.
> 
> It's not necessary, because the loop can only stop when i == base
> already, so that assertion is always going to be true.
> 
> If you mean

yes

> that we should keep everything as it was before and simply
> add that assertion then that's not enough. If base == NULL then the loop
> will stop when i->backing == NULL, not when i == base.

and yes, I'm wrong.

> 
> Berto
> 


-- 
Best regards,
Vladimir

reply via email to

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