summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kparthas@redhat.com>2012-10-11 22:43:17 +0530
committerAnand Avati <avati@redhat.com>2012-10-11 12:04:27 -0700
commit6be13228c45188b104ffde22cee36fb24db8484d (patch)
tree22f5a086de7cca2d68ce8188b14e650398769a62 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c
parent1f2dbafc72e6b4942a47dacb3899665118d7ec6b (diff)
glusterd: volume-start, add-brick and remove-brick to use synctask framework
- Added volume-id validation to glusterd-syncop code. - All daemons are restarted using synctasks in init(). - glusterd_brick_start has wait/nowait variants to support volume commands using synctask framework and those that aren't. Change-Id: Ieec26fe1ea7e5faac88cc7798d93e4cc2b399d34 BUG: 862834 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3969 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-brick-ops.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
index d0a97b138..5e93c061d 100644
--- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c
@@ -514,7 +514,7 @@ brick_val:
"failed to set the new type in dict");
}
- ret = glusterd_op_begin (req, GD_OP_ADD_BRICK, dict);
+ ret = glusterd_op_begin_synctask (req, GD_OP_ADD_BRICK, dict);
out:
if (ret) {
@@ -531,9 +531,6 @@ out:
ret = 0; //sent error to cli, prevent second reply
}
- glusterd_friend_sm ();
- glusterd_op_sm ();
-
free (cli_req.dict.dict_val); //its malloced by xdr
return ret;
@@ -806,7 +803,7 @@ glusterd_handle_remove_brick (rpcsvc_request_t *req)
}
}
- ret = glusterd_op_begin (req, GD_OP_REMOVE_BRICK, dict);
+ ret = glusterd_op_begin_synctask (req, GD_OP_REMOVE_BRICK, dict);
out:
if (ret) {
@@ -828,9 +825,6 @@ out:
GF_FREE (brick_list);
free (cli_req.dict.dict_val); //its malloced by xdr
- glusterd_friend_sm ();
- glusterd_op_sm ();
-
return ret;
}
@@ -938,7 +932,8 @@ glusterd_op_perform_add_bricks (glusterd_volinfo_t *volinfo, int32_t count,
if (ret)
goto out;
- ret = glusterd_brick_start (volinfo, brickinfo);
+ ret = glusterd_brick_start (volinfo, brickinfo,
+ _gf_true);
if (ret)
goto out;
i++;