Received: from eggs.gnu.org ([2001:4830:134:3::10]:39562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZgYBr-0002F7-OZ for qemu-devel@nongnu.org; Mon, 28 Sep 2015 09:10:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZgYBq-0000hb-UI for qemu-devel@nongnu.org; Mon, 28 Sep 2015 09:09:59 -0400 From: Alberto Garcia In-Reply-To: <1442497700-2536-13-git-send-email-kwolf@redhat.com> References: <1442497700-2536-1-git-send-email-kwolf@redhat.com> <1442497700-2536-13-git-send-email-kwolf@redhat.com> Date: Mon, 28 Sep 2015 15:09:51 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 12/16] block: Introduce parents list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: jcody@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com, mreitz@redhat.com 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. Berto