summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-12-20 14:54:35 +0530
committerAnand Avati <avati@redhat.com>2012-03-21 11:58:11 -0700
commitc3bdb1d4c6c4491afdf1ba26bb0d6204270cc058 (patch)
treef1d3e6e9adb2146754ee1a0ec12bd0ea4014ef03 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c
parent8217148c97a474a9eab4a309589ceb8ff281f5c6 (diff)
glusterd: bring in feature to use syncop for mgmt ops
* new sycnop routines added to mgmt program * one should not use 'glusterd_op_begin()', instead can use the synctask framework, 'glusterd_op_begin_synctask()' * currently using for below operations: 'volume start', 'volume rebalance', 'volume quota', 'volume replace-brick' and 'volume add-brick' Change-Id: I0bee76d06790d5c5bb5db15d443b44af0e21f1c0 BUG: 762935 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/479 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index f0d8c70d8eb..b902d30635f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -252,7 +252,7 @@ glusterd_handle_cli_start_volume (rpcsvc_request_t *req)
{
int32_t ret = -1;
gf_cli_req cli_req = {{0,}};
- char *dup_volname = NULL;
+ char *volname = NULL;
dict_t *dict = NULL;
glusterd_op_t cli_op = GD_OP_START_VOLUME;
@@ -280,17 +280,18 @@ glusterd_handle_cli_start_volume (rpcsvc_request_t *req)
}
}
- ret = dict_get_str (dict, "volname", &dup_volname);
+ ret = dict_get_str (dict, "volname", &volname);
if (ret) {
gf_log (THIS->name, GF_LOG_ERROR, "dict get failed");
goto out;
}
gf_log ("glusterd", GF_LOG_INFO, "Received start vol req"
- "for volume %s", dup_volname);
- ret = glusterd_op_begin (req, GD_OP_START_VOLUME, dict);
+ "for volume %s", volname);
+
+ ret = glusterd_op_begin_synctask (req, GD_OP_START_VOLUME, dict);
- gf_cmd_log ("volume start","on volname: %s %s", dup_volname,
+ gf_cmd_log ("volume start","on volname: %s %s", volname,
((ret == 0) ? "SUCCESS": "FAILED"));
out: