From 386ea89d93497f805c77773515a735a11ef67f29 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Sat, 4 Sep 2010 01:12:58 +0000 Subject: Create volume adding transport type option rdma Adding transport type option to cli volume create command. This is optional, and defaults to TCP. The other transport supported is rdma Signed-off-by: shishir gowda Signed-off-by: Vijay Bellur BUG: 1507 (need to add 'transport ' options to create brick) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1507 --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index cb14b853a0a..4369a4a224f 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -38,7 +38,7 @@ #include "glusterd-volgen.h" #include "glusterd-utils.h" -static int +int set_xlator_option (dict_t *dict, char *key, char *value) { @@ -1904,7 +1904,17 @@ glusterd_create_volfiles (glusterd_volinfo_t *volinfo) { int ret = -1; - + if(volinfo->transport_type == GF_TRANSPORT_RDMA) { + ret = set_xlator_option (volinfo->dict, VOLGEN_CLIENT_OPTION_TRANSTYPE, + "rdma"); + ret = set_xlator_option (volinfo->dict, VOLGEN_SERVER_OPTION_TRANSTYPE, + "rdma"); + } else { + ret = set_xlator_option (volinfo->dict, VOLGEN_CLIENT_OPTION_TRANSTYPE, + "tcp"); + ret = set_xlator_option (volinfo->dict, VOLGEN_SERVER_OPTION_TRANSTYPE, + "tcp"); + } ret = generate_brick_volfiles (volinfo); if (ret) { gf_log ("", GF_LOG_DEBUG, -- cgit