summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2010-09-04 01:12:58 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-06 02:21:44 -0700
commit386ea89d93497f805c77773515a735a11ef67f29 (patch)
treef9b23489dbebf33754645e27dbf5f94745aaf15a /xlators/mgmt/glusterd/src/glusterd-handler.c
parent4309c9b0d658185b1b7f07a98240b85870d35204 (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-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 7aa7a137b48..07a7fca85fa 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -1046,6 +1046,8 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)
glusterd_volinfo_t *volinfo = NULL;
xlator_t *this = NULL;
char *free_ptr = NULL;
+ char *trans_type = NULL;
+
GF_ASSERT (req);
this = THIS;
@@ -1098,6 +1100,11 @@ glusterd_handle_create_volume (rpcsvc_request_t *req)
goto out;
}
+ ret = dict_get_str (dict, "transport", &trans_type);
+ if (ret) {
+ gf_log ("", GF_LOG_ERROR, "Unable to get transport-type");
+ goto out;
+ }
ret = dict_get_str (dict, "bricks", &bricks);
if (ret) {
gf_log ("", GF_LOG_ERROR, "Unable to get bricks");
@@ -2587,6 +2594,10 @@ glusterd_create_volume (rpcsvc_request_t *req, dict_t *dict)
if (!data)
goto out;
+ data = dict_get (dict, "transport");
+ if (!data)
+ goto out;
+
ret = glusterd_op_txn_begin ();
out: