All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Cc: qemu-devel@nongnu.org, kwolf@redhat.com, pkrempa@redhat.com,
	jcody@redhat.com, deepakcs@redhat.com,
	bharata@linux.vnet.ibm.com, rtalur@redhat.com
Subject: Re: [Qemu-devel] [PATCH v18 3/4] block/gluster: using new qapi schema
Date: Thu, 14 Jul 2016 09:52:44 +0200	[thread overview]
Message-ID: <87twfsy7ub.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <1468418269-13490-4-git-send-email-prasanna.kalever@redhat.com> (Prasanna Kumar Kalever's message of "Wed, 13 Jul 2016 19:27:48 +0530")

Prasanna Kumar Kalever <prasanna.kalever@redhat.com> writes:

> this patch adds 'GlusterServer' related schema in qapi/block-core.json
>
> Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>

QAPI/QMP interface review only.

> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index ac8f5f6..f8b38bb 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -1634,13 +1634,14 @@
>  # @host_device, @host_cdrom: Since 2.1
>  #
>  # Since: 2.0
> +# @gluster: Since 2.7
>  ##
>  { 'enum': 'BlockdevDriver',
>    'data': [ 'archipelago', 'blkdebug', 'blkverify', 'bochs', 'cloop',
> -            'dmg', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
> -            'http', 'https', 'luks', 'null-aio', 'null-co', 'parallels',
> -            'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp', 'vdi', 'vhdx',
> -            'vmdk', 'vpc', 'vvfat' ] }
> +            'dmg', 'file', 'ftp', 'ftps', 'gluster', 'host_cdrom',
> +            'host_device', 'http', 'https', 'luks', 'null-aio', 'null-co',
> +            'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'tftp',
> +            'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat' ] }
>  
>  ##
>  # @BlockdevOptionsFile
> @@ -2033,6 +2034,62 @@
>              '*read-pattern': 'QuorumReadPattern' } }
>  
>  ##
> +# @GlusterTransport
> +#
> +# An enumeration of Gluster transport type
> +#
> +# @tcp:   TCP   - Transmission Control Protocol
> +#
> +# @unix:  UNIX  - Unix domain socket
> +#
> +# @rdma:  RDMA  - Remote direct memory access
> +#
> +# Since: 2.7
> +##
> +{ 'enum': 'GlusterTransport', 'data': [ 'tcp', 'unix', 'rdma'] }
> +
> +##
> +# @GlusterServer
> +#
> +# Details for connecting to a gluster server
> +#
> +# @host:       host address (hostname/ipv4/ipv6 addresses)
> +#
> +# @port:       #optional port number on which glusterd is listening
> +#               (default 24007)
> +#
> +# @transport:  #optional transport type used to connect to gluster management
> +#               daemon (default 'tcp')
> +#
> +# Since: 2.7
> +##
> +{ 'struct': 'GlusterServer',
> +  'data': { 'host': 'str',
> +            '*port': 'uint16',
> +            '*transport': 'GlusterTransport' } }

The meaning of @host and @port is obvious enough with @transport 'tcp',
and your documentation matches it.

Not the case for @transport 'unix'.  There is no such thing as 'host'
and 'port' with Unix domain sockets.  I'm afraid the interface makes no
sense in its current state.

I'm not familiar with RDMA, so I can't say whether your definition makes
sense there.  I can say that you shouldn't assume people are familiar
with RDMA.  Please explain what @host and @port mean there.  If they're
just like for 'tcp', say so.

For 'tcp', GlusterTransport duplicates InetSocketAddress, except it
doesn't support service names (@port is 'uint16' instead of 'str'),
doesn't support port ranges (no @to; not needed here), and doesn't
support controlling IPv4/IPv6 (no @ipv4, @ipv6).

Why is it necessary to roll your own address type?  Why can't you use
SocketAddress?

> +
> +##
> +# @BlockdevOptionsGluster
> +#
> +# Driver specific block device options for Gluster
> +#
> +# @volume:      name of gluster volume where VM image resides
> +#
> +# @path:        absolute path to image file in gluster volume
> +#
> +# @server:      gluster server description
> +#
> +# @debug_level: #libgfapi log level (default '4' which is Error)
> +#
> +# Since: 2.7
> +##
> +{ 'struct': 'BlockdevOptionsGluster',
> +  'data': { 'volume': 'str',
> +            'path': 'str',
> +            'server': 'GlusterServer',
> +            '*debug_level': 'int' } }

Are @volume and @path interpreted in any way in QEMU, or are they merely
sent to the Gluster server?

> +
> +##
>  # @BlockdevOptions
>  #
>  # Options for creating a block device.  Many options are available for all
> @@ -2095,7 +2152,7 @@
>        'file':       'BlockdevOptionsFile',
>        'ftp':        'BlockdevOptionsFile',
>        'ftps':       'BlockdevOptionsFile',
> -# TODO gluster: Wait for structured options
> +      'gluster':    'BlockdevOptionsGluster',
>        'host_cdrom': 'BlockdevOptionsFile',
>        'host_device':'BlockdevOptionsFile',
>        'http':       'BlockdevOptionsFile',

  reply	other threads:[~2016-07-14  7:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 13:57 [Qemu-devel] [PATCH v18 0/4] block/gluster: add support for multiple gluster servers Prasanna Kumar Kalever
2016-07-13 13:57 ` [Qemu-devel] [PATCH v18 1/4] block/gluster: rename [server, volname, image] -> [host, volume, path] Prasanna Kumar Kalever
2016-07-13 13:57 ` [Qemu-devel] [PATCH v18 2/4] block/gluster: code cleanup Prasanna Kumar Kalever
2016-07-13 13:57 ` [Qemu-devel] [PATCH v18 3/4] block/gluster: using new qapi schema Prasanna Kumar Kalever
2016-07-14  7:52   ` Markus Armbruster [this message]
2016-07-14  8:18     ` Prasanna Kalever
2016-07-14 10:52       ` Markus Armbruster
2016-07-14 15:33         ` Eric Blake
2016-07-13 13:57 ` [Qemu-devel] [PATCH v18 4/4] block/gluster: add support for multiple gluster servers Prasanna Kumar Kalever
2016-07-14 12:05   ` Markus Armbruster
2016-07-15 13:47     ` Prasanna Kalever

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twfsy7ub.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=deepakcs@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=prasanna.kalever@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rtalur@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.