From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZYzR0-0002JK-Kt for qemu-devel@nongnu.org; Mon, 07 Sep 2015 12:38:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZYzQz-0008E0-Hk for qemu-devel@nongnu.org; Mon, 07 Sep 2015 12:38:22 -0400 References: <1437414365-11881-1-git-send-email-mreitz@redhat.com> <1437414365-11881-3-git-send-email-mreitz@redhat.com> <20150907161202.GF5529@noname.redhat.com> From: Max Reitz Message-ID: <55EDBD74.6070409@redhat.com> Date: Mon, 7 Sep 2015 18:38:12 +0200 MIME-Version: 1.0 In-Reply-To: <20150907161202.GF5529@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HtCMPT7Ch0m5kW7QhAxeXQq8KTI8F0hku" Subject: Re: [Qemu-devel] [PATCH v4 02/38] blockdev: Allow creation of BDS trees without BB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HtCMPT7Ch0m5kW7QhAxeXQq8KTI8F0hku Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 07.09.2015 18:12, Kevin Wolf wrote: > Am 20.07.2015 um 19:45 hat Max Reitz geschrieben: >> If the "id" field is missing from the options given to blockdev-add, >> just omit the BlockBackend and create the BlockDriverState tree alone.= >> >> However, if "id" is missing, "node-name" must be specified; otherwise,= >> the BDS tree would no longer be accessible. >=20 > We can probably lift this restriction once Jeff's auto-generated ID > patches are in. However, allowing additional things is easy, so no > objection here. Maybe we can lift it, but I don't know. In order to know the node-name, you'd have to do a query-named-block-nodes before blockdev-add and another one afterwards, diff it, and thus obtain the ID. But maybe that doesn't even work, since one blockdev-add operation usually adds multiple BDSs at ones. >> Many BDS options which are not parsed by bdrv_open() (like caching) >> cannot be specified for these BB-less BDS trees yet. A future patch wi= ll >> remove this limitation. >=20 > This makes the command mostly useless, but that's okay. Well, the future patch is part of this series, so yes, it is okay. > We'll be working > on converting flags to QDict options one by one and then it will start > working. >=20 > There is, however, one flag that doesn't correspond to an option or > enable an additional feature that is simply missing until then. That on= e > worries me a bit: BDRV_O_INCOMING. We should probably include it in thi= s > patch; or maybe better add another patch before this one which moves th= e > setting of BDRV_O_INCOMING from blockdev_init() to bdrv_open_common(). Hm, probably so, yes. It's still missing at the end of this series, too. However, as far as I can see, O_INCOMING is set only for the root BDS, so moving it to bdrv_open_common() would probably change behavior, though maybe that'd be a bug fix, actually. Max >> Signed-off-by: Max Reitz >> Reviewed-by: Eric Blake >> Reviewed-by: Alberto Garcia >> --- >> blockdev.c | 44 +++++++++++++++++++++++++++++++------= ------- >> qapi/block-core.json | 13 +++++++++---- >> tests/qemu-iotests/087 | 2 +- >> tests/qemu-iotests/087.out | 4 ++-- >> 4 files changed, 43 insertions(+), 20 deletions(-) >=20 > Kevin >=20 --HtCMPT7Ch0m5kW7QhAxeXQq8KTI8F0hku 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 iQEcBAEBCAAGBQJV7b10AAoJEDuxQgLoOKytRPwH/i8V7fcmN+vqyUNxQhogSs9j /AqBjz0H3NebdHTLA4Jfw1mwCdMy4MCsflj9dHUviNeCLbEWXUDe/AR0nmI3h7kz 5Y9BHmRpxaUr6Ax+MLRTmwJYojPm+tEDvOL5h+eCwJpq0LeyrpeqQtmZeWMWfgHh E8dJGcv8hrg88BZJXTzG3yYQ67CS+H5XdPvLfjlsERbSjdxjwcp1O1xnuw3Dbr0Z 1n8Sk7N5orhlVzD1+eabrMnI5A+dsUNys38SfpjqL6JHHBYO8xh3vxy7Lf/xIeT2 zz8Kj9CnJyfH9ab8nDPvu5tD3jVEd/Bd53RflDXhgdceBg96KiMQT8MEDJVwouM= =A+nn -----END PGP SIGNATURE----- --HtCMPT7Ch0m5kW7QhAxeXQq8KTI8F0hku--