qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach


From: Hanna Reitz
Subject: Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach
Date: Wed, 10 Nov 2021 16:12:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

On 10.11.21 13:51, Vladimir Sementsov-Ogievskiy wrote:
04.11.2021 13:38, Hanna Reitz wrote:
The children list is specific to BDS parents.  We should not modify it
in the general children modification code, but let BDS parents deal with
it in their .attach() and .detach() methods.

This also has the advantage that a BdrvChild is removed from the
children list before its .bs pointer can become NULL.  BDS parents
generally assume that their children's .bs pointer is never NULL, so
this is actually a bug fix.

Signed-off-by: Hanna Reitz<hreitz@redhat.com>


Interesting that nor child_root neither child_job do similar things in .attach / .detach ... Should we do something with it?

Well, it’s up to them, I thought. :)

A BB only has a single child, so it doesn’t need a list.  Jobs do have their own child list (BlockJob.nodes).  I thought a bit about this when writing this series, and I figured perhaps they don’t need to care about that in .attach() and .detach(), because they don’t really expect nodes to be detached or attached anyway; child_job.stay_at_node is true, after all.

Hanna




reply via email to

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