diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2012-10-11 22:43:17 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-10-11 12:04:27 -0700 |
commit | 6be13228c45188b104ffde22cee36fb24db8484d (patch) | |
tree | 22f5a086de7cca2d68ce8188b14e650398769a62 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c | |
parent | 1f2dbafc72e6b4942a47dacb3899665118d7ec6b (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-volume-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index d167ed10022..d42694353af 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -260,14 +260,11 @@ glusterd_handle_cli_start_volume (rpcsvc_request_t *req) gf_log (this->name, GF_LOG_INFO, "Received start vol req" " for volume %s", volname); - ret = glusterd_op_begin (req, GD_OP_START_VOLUME, dict); + ret = glusterd_op_begin_synctask (req, GD_OP_START_VOLUME, dict); out: free (cli_req.dict.dict_val); //its malloced by xdr - glusterd_friend_sm (); - glusterd_op_sm (); - if (ret) { ret = glusterd_op_send_cli_response (cli_op, ret, 0, req, dict, "operation failed"); @@ -1415,7 +1412,7 @@ glusterd_op_start_volume (dict_t *dict, char **op_errstr) if (ret) goto out; list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) { - ret = glusterd_brick_start (volinfo, brickinfo); + ret = glusterd_brick_start (volinfo, brickinfo, _gf_true); if (ret) goto out; } |