Received: from eggs.gnu.org ([2001:4830:134:3::10]:50390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz95P-00060x-PO for qemu-devel@nongnu.org; Tue, 25 Oct 2016 17:16:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz95L-0003MT-OD for qemu-devel@nongnu.org; Tue, 25 Oct 2016 17:16:43 -0400 References: <1477337274-7939-1-git-send-email-ashijeetacharya@gmail.com> <1477337274-7939-3-git-send-email-ashijeetacharya@gmail.com> From: Eric Blake Message-ID: <1cf114e6-aa47-677c-43aa-06240e852c26@redhat.com> Date: Tue, 25 Oct 2016 16:16:27 -0500 MIME-Version: 1.0 In-Reply-To: <1477337274-7939-3-git-send-email-ashijeetacharya@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ufftW7140H2a4I5OadaI6bAManwiuInFH" 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: Ashijeet Acharya , pl@kamp.de Cc: jcody@redhat.com, kwolf@redhat.com, mreitz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ufftW7140H2a4I5OadaI6bAManwiuInFH From: Eric Blake To: Ashijeet Acharya , pl@kamp.de Cc: jcody@redhat.com, kwolf@redhat.com, mreitz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Message-ID: <1cf114e6-aa47-677c-43aa-06240e852c26@redhat.com> Subject: Re: [PATCH v2 2/2] qapi: allow blockdev-add for NFS References: <1477337274-7939-1-git-send-email-ashijeetacharya@gmail.com> <1477337274-7939-3-git-send-email-ashijeetacharya@gmail.com> In-Reply-To: <1477337274-7939-3-git-send-email-ashijeetacharya@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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' ] } Missing a comment that 'nfs' is since 2.8. > ## > +# @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', 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. Must 'type' be mandatory if it must always be 'tcp'? > + 'host': 'str' } } > + > +## > +# @BlockdevOptionsNfs > +# > +# Driver specific block device option for NFS > +# > +# @server: host address > +# > +# @path: path of the image on the host > +# > +# @uid: #optional UID value to use when talking to the serve= r > +# > +# @gid: #optional GID value to use when talking to the serve= r Do we want to allow string names in addition to numeric uid/gid values? I'm not sure if NFS has name-based id mapping, but it's food for thought on whether we need to use an alternate type here (alternate between integer id and string name), or leave this as is. > +# > +# @tcp-syncnt: #optional number of SYNs during the session establis= hment Would tcp-syn-count be any more legible? What is the default when omitte= d? > +# > +# @readahead: #optional set the readahead size in bytes What's the default when omitted? > +# > +# @pagecache: #optional set the pagecache size in bytes Default? > +# > +# @debug: #optional set the NFS debug level (max 2) Presumably default 0? > +# > +# Since 2.8 > +## > +{ 'struct': 'BlockdevOptionsNfs', > + 'data': { 'server': 'NFSServer', > + 'path': 'str', > + '*uid': 'int', > + '*gid': 'int', > + '*tcp-syncnt': 'int', > + '*readahead': 'int', > + '*pagecache': 'int', > + '*debug': 'int' } } > + --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --ufftW7140H2a4I5OadaI6bAManwiuInFH 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/ iQEcBAEBCAAGBQJYD8urAAoJEKeha0olJ0NqKbgH/0T4E8ov6zEqSpxC5OJxmxs2 EjroSDcCSkEVHyW7oWyRP+G5BdqXIqS5HwWOTaQthMK1Rz1Gh09p3Sxs5/F02gYG J+vbb08GHjZ3IS4Bu7KC3jttA85nrGU1/h2mJTdemkxGAzK+HrfWmT5tcPLlvjjJ icmoyIKdYPFtJjvLvfNIq3/VJRd9P7mYo86F8Zdtu+quPv+8lnRBrBIhjPynPA0T 4i4AWwAXtWj5bE+jwKAfB80m/JNfjDPdHFDI/JA4Gffp9Y7HMdE3UKCV0UnqmcDi Ya6pqaqDT5xYgiJOwMpQRbvAw1IUPOWvR7sm/VZ6UfukI/zcb7RutS/aYuEJGxs= =FBsc -----END PGP SIGNATURE----- --ufftW7140H2a4I5OadaI6bAManwiuInFH--