diff options
author | Amar Tumballi <amar@gluster.com> | 2011-09-07 12:46:30 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-09 02:20:23 -0700 |
commit | 85a2f0ec5021d53f34fe1630028f413835abd31e (patch) | |
tree | 88408f05e2cde7d7768a714eeed15685c498b391 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | 77eb7bdfd02f2ba61847fb9c35e9e19e3da4fcc4 (diff) |
glusterd rebalance: make co-operate with all other 'op'
that way, we can share the rebalance state with other peers
and can prevent confusion/conflicts when multiple rebalances
are done by different peers.
Change-Id: I24159e69332644718df7314f6f1da7fce9ff740e
BUG: 2112
Reviewed-on: http://review.gluster.com/343
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 44298d663..3b30fb080 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1559,6 +1559,7 @@ glusterd_op_build_payload (dict_t **req) case GD_OP_PROFILE_VOLUME: case GD_OP_LOG_LEVEL: case GD_OP_STATUS_VOLUME: + case GD_OP_REBALANCE: { dict_t *dict = ctx; dict_copy (dict, req_dict); @@ -2331,6 +2332,10 @@ glusterd_op_stage_validate (glusterd_op_t op, dict_t *dict, char **op_errstr, ret = glusterd_op_stage_status_volume (dict, op_errstr); break; + case GD_OP_REBALANCE: + ret = glusterd_op_stage_rebalance (dict, op_errstr); + break; + default: gf_log ("", GF_LOG_ERROR, "Unknown op %d", op); @@ -2418,6 +2423,10 @@ glusterd_op_commit_perform (glusterd_op_t op, dict_t *dict, char **op_errstr, ret = glusterd_op_status_volume (dict, op_errstr, rsp_dict); break; + case GD_OP_REBALANCE: + ret = glusterd_op_rebalance (dict, op_errstr, rsp_dict); + break; + default: gf_log ("", GF_LOG_ERROR, "Unknown op %d", op); @@ -3414,6 +3423,7 @@ glusterd_op_free_ctx (glusterd_op_t op, void *ctx) case GD_OP_PROFILE_VOLUME: case GD_OP_LOG_LEVEL: case GD_OP_STATUS_VOLUME: + case GD_OP_REBALANCE: dict_unref (ctx); break; case GD_OP_DELETE_VOLUME: |