diff options
author | shishir gowda <shishirng@gluster.com> | 2010-09-04 01:12:58 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-06 02:21:44 -0700 |
commit | 386ea89d93497f805c77773515a735a11ef67f29 (patch) | |
tree | f9b23489dbebf33754645e27dbf5f94745aaf15a /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | 4309c9b0d658185b1b7f07a98240b85870d35204 (diff) |
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 <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1507 (need to add 'transport <type>' options to create brick)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1507
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 14 |
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 cb14b853a..4369a4a22 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, |