summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c14
1 files changed, 12 insertions, 2 deletions
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,