From patchwork Tue Jul 19 16:57:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prasanna Kumar Kalever X-Patchwork-Id: 9237861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AD46860574 for ; Tue, 19 Jul 2016 17:04:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C2ED26A5C for ; Tue, 19 Jul 2016 17:04:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 908B326C2F; Tue, 19 Jul 2016 17:04:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 18C2026A5C for ; Tue, 19 Jul 2016 17:04:45 +0000 (UTC) Received: from localhost ([::1]:57305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPYRo-0001iM-R4 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 19 Jul 2016 13:04:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPYMA-00032T-19 for qemu-devel@nongnu.org; Tue, 19 Jul 2016 12:58:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPYM6-0003TE-4y for qemu-devel@nongnu.org; Tue, 19 Jul 2016 12:58:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPYM5-0003Sd-Sj for qemu-devel@nongnu.org; Tue, 19 Jul 2016 12:58:50 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6810031A324 for ; Tue, 19 Jul 2016 16:58:49 +0000 (UTC) Received: from dhcp1-86.lab.eng.blr.redhat.com (vpn1-7-24.sin2.redhat.com [10.67.7.24]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6JGvsJU028546; Tue, 19 Jul 2016 12:58:41 -0400 From: Prasanna Kumar Kalever To: qemu-devel@nongnu.org Date: Tue, 19 Jul 2016 22:27:31 +0530 Message-Id: <1468947453-5433-4-git-send-email-prasanna.kalever@redhat.com> In-Reply-To: <1468947453-5433-1-git-send-email-prasanna.kalever@redhat.com> References: <1468947453-5433-1-git-send-email-prasanna.kalever@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 19 Jul 2016 16:58:49 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v20 3/5] block/gluster: deprecate rdma support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, pkrempa@redhat.com, Prasanna Kumar Kalever , vbellur@redhat.com, jcody@redhat.com, armbru@redhat.com, rtalur@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Jeff Cody --- 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",