From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzKpi-0003VK-2V for qemu-devel@nongnu.org; Wed, 26 Oct 2016 05:49:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzKph-00062w-97 for qemu-devel@nongnu.org; Wed, 26 Oct 2016 05:49:18 -0400 Date: Wed, 26 Oct 2016 11:49:08 +0200 From: Kevin Wolf Message-ID: <20161026094908.GI4758@noname.str.redhat.com> References: <1477337274-7939-1-git-send-email-ashijeetacharya@gmail.com> <1477337274-7939-3-git-send-email-ashijeetacharya@gmail.com> <1cf114e6-aa47-677c-43aa-06240e852c26@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zbGR4y+acU1DwHSi" Content-Disposition: inline In-Reply-To: <1cf114e6-aa47-677c-43aa-06240e852c26@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 2/2] qapi: allow blockdev-add for NFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Ashijeet Acharya , pl@kamp.de, jcody@redhat.com, mreitz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org --zbGR4y+acU1DwHSi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 25.10.2016 um 23:16 hat Eric Blake geschrieben: > On 10/24/2016 02:27 PM, Ashijeet Acharya wrote: > > Introduce new object 'BlockdevOptionsNFS' in qapi/block-core.json to > > support blockdev-add for NFS network protocol driver. Also make a new > > struct NFSServer to support tcp connection. > >=20 > > Signed-off-by: Ashijeet Acharya > > --- > > qapi/block-core.json | 56 ++++++++++++++++++++++++++++++++++++++++++++= ++++---- > > 1 file changed, 52 insertions(+), 4 deletions(-) > >=20 > > diff --git a/qapi/block-core.json b/qapi/block-core.json > > index 9d797b8..3ab028d 100644 > > --- a/qapi/block-core.json > > +++ b/qapi/block-core.json > > @@ -1714,9 +1714,9 @@ > > { 'enum': 'BlockdevDriver', > > 'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop', > > 'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom', > > - 'host_device', 'http', 'https', 'luks', 'null-aio', 'null-= co', > > - 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', > > - 'replication', 'tftp', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] } > > + 'host_device', 'http', 'https', 'luks', 'nfs', 'null-aio', > > + 'null-co', 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', = 'raw', > > + 'replication', 'tftp', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfa= t' ] } >=20 > Missing a comment that 'nfs' is since 2.8. >=20 > > ## > > +# @NFSServer > > +# > > +# Captures the address of the socket > > +# > > +# @type: transport type used for NFS (only TCP supported) > > +# > > +# @host: host part of the address > > +# > > +# Since 2.8 > > +## > > +{ 'struct': 'NFSServer', > > + 'data': { 'type': 'str', >=20 > Please make this an enum, instead of an open-coded string. It's okay if > the enum only has one value 'tcp' for now; but using an enum will make > it introspectable if we later add a second transport, unlike what we get > with an open-coded string. >=20 > Must 'type' be mandatory if it must always be 'tcp'? I think the idea here was to make the wire format compatible with SocketAddress so we could later extend it. So it any case, it should be 'inet' rather than 'tcp'. Using an enum is probably a good idea, too. Kevin --zbGR4y+acU1DwHSi Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJYEHwUAAoJEH8JsnLIjy/WkNAQAK0A4Zbqt9SD3f8FlHi52Pch thF1PQ2Ztonq1iw7Om0eT5zq95T6Lo7b/ObOoo165stM9fb+drveWBxTUphDYCwI mBwh21J9uOvm/WkBHCc9TpkwImBoDFxARO0l5bfwlZeCsZASy31raEmRu0pM3tl6 n5HUIsg6hyXRDgbIqF4tn1QdxjzPnN7e9O5mjOyhwkX7EpVT3vox8/+qM8Cafiwm ymMp+BPa+BiXaoJOsBS0R+n9RDMYy/Xo6uPEUNGEPgHnLKmFgTbAvKAk4GqDZZVp CrLnEYZb4sdoRS6JfFCZQNLGTZy+pevMDoxcUiBUagpobmWzEJQfRh/x5PsChX62 Iro0ddfeLa2ZYY7ectlHZOqBX/jywr9BzQPfwOaIu0JYLRyXNv4ucKaKlB3MiWGt 9NmFSTZ448zixQDjXAXpT/3fWN6UjUd1k40rskQiHiVhZXyIXY3qOgJrGiP9XqVe ALTpHK7oggUJtvW+NhvcvKAVLmX0c0jv5EpAePO8nIxt+98Uw+F4bCaHfBJjX3hB 4foR6H7bi7oVavsIqFd2uxwA0RRInfrfdM7povuyJ5yGCK8vIYnHODbrGeZI0Qm6 9yEmQW9wcmY7RuqStvTDS0J1BTrpWTC3bXuxokhYlacOGM+EWXBFjqqF/0kebTMk CzTHRE+WrMGohP8Tq9tV =O1Dn -----END PGP SIGNATURE----- --zbGR4y+acU1DwHSi--