From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZYfK-0004Nr-Um for qemu-devel@nongnu.org; Wed, 09 Sep 2015 02:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZYfK-0003zF-2b for qemu-devel@nongnu.org; Wed, 09 Sep 2015 02:15:30 -0400 References: <1439279489-13338-1-git-send-email-wency@cn.fujitsu.com> <1439279489-13338-4-git-send-email-wency@cn.fujitsu.com> <55E4917A.9010703@redhat.com> <55E4F4FF.1000504@cn.fujitsu.com> <55E5C4B0.1080301@redhat.com> <55EEA5FE.2000507@cn.fujitsu.com> <55EF0427.3020301@redhat.com> From: Wen Congyang Message-ID: <55EFCE5B.50102@cn.fujitsu.com> Date: Wed, 9 Sep 2015 14:14:51 +0800 MIME-Version: 1.0 In-Reply-To: <55EF0427.3020301@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu devel , Markus Armbruster , Alberto Garcia , Stefan Hajnoczi Cc: Kevin Wolf , zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , Gonglei , Yang Hongyang On 09/08/2015 11:52 PM, Eric Blake wrote: > On 09/08/2015 03:10 AM, Wen Congyang wrote: > >>> Design-wise, I think we really want to have the add-child operation be >>> handed a pre-opened BDS, rather than the options dictionary to open the >>> BDS itself. That is, we should use the existing blockdev-add (and >>> enhance it to support everything) to open the BDS, and then this command >>> should just attach that BDS as the new child (which is why it IS >>> important that we validate that the new BDS being added doesn't create >>> an invalid loop). >>> >> >> How to check it? The parent BDS can get all children. But the child doesn't >> know if it is some BDS's child. > > If I'm not mistaken, a child DOES know what its parent(s) are, once we > have Max's series for NULL BDS representing a BB without media. > Which patch? I don't find it. Thanks Wen Congyang