On Wed 23 Sep 2020 07:11:57 PM CEST, Vladimir Sementsov-Ogievskiy wrote:
>>     BlockDriverState *last_bs = include_base ? base : backing_bs(base);
>
> hmm, in case when include_base is false, last bs is not
> backing_bs(base) but the parent of base.

Oops, yes, it should be the other way around %-)

>> But why do we need include_base at all? Can't the caller just pass
>> backing_bs(base) instead? I'm talking also about the existing case of
>> bdrv_is_allocated_above().
>
> include_base was introduced for the case when caller doesn't own
> backing_bs(base), and therefore shouldn't do operations that may yield
> (block_status can) dependent on backing_bs(base). In particular, in
> block stream, where link to base is not frozen.

You're right, thanks!

Berto

Reply via email to