qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 12/16] block: Introduce parents list


From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH 12/16] block: Introduce parents list
Date: Tue, 29 Sep 2015 14:21:37 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 28.09.2015 um 15:09 hat Alberto Garcia geschrieben:
> On Thu 17 Sep 2015 03:48:16 PM CEST, Kevin Wolf wrote:
> 
> > @@ -1090,6 +1090,7 @@ static BdrvChild *bdrv_attach_child(BlockDriverState 
> > *parent_bs,
> >      };
> >  
> >      QLIST_INSERT_HEAD(&parent_bs->children, child, next);
> > +    QLIST_INSERT_HEAD(&child_bs->parents, child, next_parent);
> >  
> >      return child;
> >  }
> 
> Ok, I'm probably slow today, but what is this used for? :-? And why is
> it called 'parents'? The list doesn't contain pointers to the parents of
> child_bs, but to child_bs itself...
> 
> I would expect a BdrvChild *parent, with parent->bs = parent_bs.

It's the list of BdrvChild objects that point to the given
BlockDriverState. This is good enough for updating the pointers. If we
ever need the actual parent BDS, we can add a pointer to BdrvChild.

Kevin



reply via email to

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