From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZLC3-00064D-Uf for qemu-devel@nongnu.org; Tue, 08 Sep 2015 11:52:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZLBy-0003E1-C3 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 11:52:23 -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> From: Eric Blake Message-ID: <55EF0427.3020301@redhat.com> Date: Tue, 8 Sep 2015 09:52:07 -0600 MIME-Version: 1.0 In-Reply-To: <55EEA5FE.2000507@cn.fujitsu.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="e5bOW8V2sVp2srANBfJW49wuHUcj1ow6g" 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: Wen Congyang , 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 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --e5bOW8V2sVp2srANBfJW49wuHUcj1ow6g Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 th= e >> BDS itself. That is, we should use the existing blockdev-add (and >> enhance it to support everything) to open the BDS, and then this comma= nd >> 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). >> >=20 > How to check it? The parent BDS can get all children. But the child doe= sn'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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --e5bOW8V2sVp2srANBfJW49wuHUcj1ow6g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV7wQnAAoJEKeha0olJ0Nqf5QH/3GdP9dPJ8MhL10NPkEhoWm2 +SMQI7Y9gnHy8txWo92xT+t1YNH8sfd2z8Os0JjF2KPC3xvTG5SalJDc1mRiPk7x pTihwcZMGHzfpzDr2PG59hl/0Pfnzv65RqKHixVZ8ybUHbZ7k24nQmHqFpqbVK3M FxD8kTyaeLU4FKKPYkGZ0A9TBfWNsrKznhxHijtseqebCOCxSdm0pQgGQz8hRtrz +E873e4C+yOXmKBfUQN+seEBoMwGFrqdzqEcF1zOJn0BqcoA59Q+pI19wpu3eVN5 46W1KSOHduNYjYUaPwlm2tI4PA8OOD19Abp+rwPfIjxglnruV1iuHEY4va9L2q4= =hhql -----END PGP SIGNATURE----- --e5bOW8V2sVp2srANBfJW49wuHUcj1ow6g--