[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH for-4.0 1/3] block: continue until base is found
Re: [Qemu-block] [PATCH for-4.0 1/3] block: continue until base is found in bdrv_freeze_backing_chain() et al
Thu, 28 Mar 2019 15:43:20 +0100
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)
On Thu 28 Mar 2019 11:33:55 AM CET, Vladimir Sementsov-Ogievskiy wrote:
>>> All three functions that handle the BdrvChild.frozen attribute walk
>>> the backing chain from 'bs' to 'base' and stop either when 'base' is
>>> found or at the end of the chain if 'base' is NULL.
>>> However if 'base' is not found then the functions return without
>>> errors as if it was NULL.
>>> This is wrong: if the caller passed an incorrect parameter that means
>>> that there is a bug in the code.
>>> Signed-off-by: Alberto Garcia <address@hidden>
>> interesting that bdrv_is_allocated_above has the same flaw. Could you
>> fix it too?
> However bdrv_is_allocated_above is differs from your functions, as it
> may yield.. And graph may change while it is running.. Shouldn't we
> freeze backing chain every time we want to call
I think all callers of bdrv_is_allocated_above() already freeze the
chain themselves? Anyway I would not change this for 4.0 without an
- [Qemu-block] [PATCH for-4.0 2/3] block: freeze the backing chain earlier in stream_start(), (continued)