qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, kwolf@redhat.com, eblake@redhat.com,
	pkrempa@redhat.com, jcody@redhat.com, rtalur@redhat.com,
	vbellur@redhat.com,
	Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Subject: [Qemu-devel] [PATCH v20 3/5] block/gluster: deprecate rdma support
Date: Tue, 19 Jul 2016 22:27:31 +0530	[thread overview]
Message-ID: <1468947453-5433-4-git-send-email-prasanna.kalever@redhat.com> (raw)
In-Reply-To: <1468947453-5433-1-git-send-email-prasanna.kalever@redhat.com>

gluster volfile server fetch happens through unix and/or tcp, it doesn't
support volfile fetch over rdma, the rdma code may actually mislead,
to make sure things do not break, for now we fallback to tcp when requested
for rdma with a warning.

If you are wondering how this worked all these days, its the gluster libgfapi
code which handles anything other than unix transport as socket/tcp, sad but
true.

Also gluster doesn't support ipv6 addresses, removing the ipv6 related
comments/docs section

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
---
 block/gluster.c | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/block/gluster.c b/block/gluster.c
index 40ee852..8a54ad4 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -12,6 +12,7 @@
 #include "block/block_int.h"
 #include "qapi/error.h"
 #include "qemu/uri.h"
+#include "qemu/error-report.h"
 
 #define GLUSTER_OPT_FILENAME        "filename"
 #define GLUSTER_OPT_DEBUG           "debug"
@@ -134,12 +135,10 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
  *
  * 'transport' specifies the transport type used to connect to gluster
  * management daemon (glusterd). Valid transport types are
- * tcp, unix and rdma. If a transport type isn't specified, then tcp
- * type is assumed.
+ * tcp, unix. If a transport type isn't specified, then tcp type is assumed.
  *
  * 'host' specifies the host where the volume file specification for
- * the given volume resides. This can be either hostname, ipv4 address
- * or ipv6 address. ipv6 address needs to be within square brackets [ ].
+ * the given volume resides. This can be either hostname, ipv4 address.
  * If transport type is 'unix', then 'host' field should not be specified.
  * The 'socket' field needs to be populated with the path to unix domain
  * socket.
@@ -158,11 +157,8 @@ static int parse_volume_options(GlusterConf *gconf, char *path)
  * file=gluster://1.2.3.4/testvol/a.img
  * file=gluster+tcp://1.2.3.4/testvol/a.img
  * file=gluster+tcp://1.2.3.4:24007/testvol/dir/a.img
- * file=gluster+tcp://[1:2:3:4:5:6:7:8]/testvol/dir/a.img
- * file=gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img
  * file=gluster+tcp://host.domain.com:24007/testvol/dir/a.img
  * file=gluster+unix:///testvol/dir/a.img?socket=/tmp/glusterd.socket
- * file=gluster+rdma://1.2.3.4:24007/testvol/a.img
  */
 static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
 {
@@ -185,7 +181,9 @@ static int qemu_gluster_parseuri(GlusterConf *gconf, const char *filename)
         gconf->transport = g_strdup("unix");
         is_unix = true;
     } else if (!strcmp(uri->scheme, "gluster+rdma")) {
-        gconf->transport = g_strdup("rdma");
+        gconf->transport = g_strdup("tcp");
+        error_report("Warning: rdma feature is not supported falling "
+                     "back to tcp");
     } else {
         ret = -EINVAL;
         goto out;
@@ -1048,6 +1046,12 @@ static BlockDriver bdrv_gluster_unix = {
     .create_opts                  = &qemu_gluster_create_opts,
 };
 
+/* rdma is deprecated (actually never supported for volfile fetch)
+ * lets maintain for the protocol compatibility, to make sure things
+ * won't break immediately for now gluster+rdma will fall back to gluster+tcp
+ * protocol with Warning
+ * TODO: remove gluster+rdma interface support
+ */
 static BlockDriver bdrv_gluster_rdma = {
     .format_name                  = "gluster",
     .protocol_name                = "gluster+rdma",
-- 
2.7.4

  parent reply	other threads:[~2016-07-19 16:58 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 16:57 [Qemu-devel] [PATCH v20 0/5] block/gluster: add support for multiple gluster servers Prasanna Kumar Kalever
2016-07-19 16:57 ` [Qemu-devel] [PATCH v20 1/5] block/gluster: rename [server, volname, image] -> [host, volume, path] Prasanna Kumar Kalever
2016-07-19 16:57 ` [Qemu-devel] [PATCH v20 2/5] block/gluster: code cleanup Prasanna Kumar Kalever
2016-07-19 16:57 ` Prasanna Kumar Kalever [this message]
2016-07-19 17:17   ` [Qemu-devel] [PATCH v20 3/5] block/gluster: deprecate rdma support Markus Armbruster
2016-07-19 18:09   ` Eric Blake
2016-07-19 18:46   ` Jeff Cody
2016-07-19 16:57 ` [Qemu-devel] [PATCH v20 4/5] block/gluster: using new qapi schema Prasanna Kumar Kalever
2016-07-19 17:30   ` Markus Armbruster
2016-07-19 17:37   ` Markus Armbruster
2016-07-19 18:38   ` Eric Blake
2016-07-19 20:39   ` Jeff Cody
2016-07-19 21:31     ` Jeff Cody
2016-07-19 16:57 ` [Qemu-devel] [PATCH v20 5/5] block/gluster: add support for multiple gluster servers Prasanna Kumar Kalever
2016-07-19 17:55   ` Markus Armbruster
2016-07-19 18:33   ` Markus Armbruster
2016-07-19 19:01     ` Prasanna Kalever
2016-07-19 20:46   ` Jeff Cody
2016-07-19 22:32   ` Eric Blake
2016-07-19 21:40 ` [Qemu-devel] [PATCH v20 0/5] " Jeff Cody

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=1468947453-5433-4-git-send-email-prasanna.kalever@redhat.com \
    --to=prasanna.kalever@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pkrempa@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rtalur@redhat.com \
    --cc=vbellur@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).