qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v5 2/2] qapi: allow blockdev-add for NFS


From: Eric Blake
Subject: Re: [Qemu-block] [PATCH v5 2/2] qapi: allow blockdev-add for NFS
Date: Fri, 28 Oct 2016 15:08:39 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 10/28/2016 12:09 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.
> 
> Signed-off-by: Ashijeet Acharya <address@hidden>
> ---
>  qapi/block-core.json | 74 
> +++++++++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 71 insertions(+), 3 deletions(-)
> 
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 3592a9d..c0c9b48 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1714,14 +1714,14 @@
>  #
>  # @host_device, @host_cdrom: Since 2.1
>  # @gluster: Since 2.7
> -# @nbd, @ssh: Since 2.8
> +# @nbd, @ssh, @nfs: Since 2.8

Might be nice to keep the list alphabetical per release (nfs before
ssh).  Also minor conflict with a patch to mention 'replication' in this
list.


>  
>  ##
> +# @NFSTransport
> +#
> +# An enumeration of NFS transport types
> +#
> +# @inet:        TCP transport
> +#
> +# Since 2.8
> +##
> +{ 'enum': 'NFSTransport',
> +  'data': [ 'inet' ] }
> +
> +##
> +# @NFSServer
> +#
> +# Captures the address of the socket

Might be worth a mention that this type is explicitly modeled to be a
subset of SocketAddress and/or GlusterServer (except see below - I'm not
sure it is a subset of either).

> +#
> +# @type:        transport type used for NFS (only TCP supported)
> +#
> +# @host:        host address for NFS server
> +#
> +# Since 2.8
> +##
> +{ 'struct': 'NFSServer',
> +  'data': { 'type': 'NFSTransport',
> +            'host': 'str' } }

Uggh. We used 'type':'inet' in SocketAddress, but 'type':'tcp' for
GlusterServer.  Compared to SocketAddress (the 'inet' branch), we have
no 'port' or 'to' parameter, and no optional 'ipv4' or 'ipv6' bools.  Do
we NEED to be able to distinguish between ipv4 and ipv6 addresses?

Did we really botch GlusterServer in the 2.7 release?

> +
> +##
> +# @BlockdevOptionsNfs
> +#
> +# Driver specific block device option for NFS
> +#
> +# @server:                  host address
> +#
> +# @path:                    path of the image on the host
> +#
> +# @user:                    #optional UID value to use when talking to the
> +#                           server (defaults to 65534 on Windows and getuid()
> +#                           on unix)
> +#
> +# @group:                   #optional GID value to use when talking to the
> +#                           server (defaults to 65534 on Windows and getgid()
> +#                           in unix)
> +#
> +# @tcp-syn-count:           #optional number of SYNs during the session
> +#                           establishment (defaults to libnfs default)
> +#
> +# @readahead-size:          #optional set the readahead size in bytes 
> (defaults
> +#                           to libnfs default)
> +#
> +# @page-cache-size:         #optional set the pagecache size in bytes 
> (defaults
> +#                           to libnfs default)
> +#
> +# @debug-level:             #optional set the NFS debug level (max 2) 
> (defaults
> +#                           to libnfs default)
> +#
> +# Since 2.8
> +##
> +{ 'struct': 'BlockdevOptionsNfs',
> +  'data': { 'server': 'NFSServer',
> +            'path': 'str',
> +            '*user': 'int',
> +            '*group': 'int',
> +            '*tcp-syn-count': 'int',
> +            '*readahead-size': 'int',
> +            '*page-cache-size': 'int',
> +            '*debug-level': 'int' } }

This looks good.

> +
> +##
>  # @BlockdevOptionsCurl
>  #
>  # Driver specific block device options for the curl backend.
> @@ -2315,7 +2383,7 @@
>  # TODO iscsi: Wait for structured options
>        'luks':       'BlockdevOptionsLUKS',
>        'nbd':        'BlockdevOptionsNbd',
> -# TODO nfs: Wait for structured options
> +      'nfs':        'BlockdevOptionsNfs',
>        'null-aio':   'BlockdevOptionsNull',
>        'null-co':    'BlockdevOptionsNull',
>        'parallels':  'BlockdevOptionsGenericFormat',
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]