diff options
author | Avra Sengupta <asengupt@redhat.com> | 2013-02-08 17:20:05 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-16 22:32:22 -0800 |
commit | 5b8cb263756a9d2beb5e70dca0b652286c7e6b67 (patch) | |
tree | 321a18df24196d022527ffb22397289dcbcc4a51 /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | 86854a544e5bcc05bf6a57b7b622c48ddafc79b5 (diff) |
glusterd: Made volume-heal use synctask framework.
Change-Id: Ic6659335f18a3befcf9b8b3ca067883a2c889d03
BUG: 852147
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4493
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 3c51879d921..f39de3116df 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4368,7 +4368,8 @@ out: static int glusterd_bricks_select_heal_volume (dict_t *dict, char **op_errstr, - struct list_head *selected) + struct list_head *selected, + dict_t *rsp_dict) { int ret = -1; char *volname = NULL; @@ -4379,7 +4380,6 @@ glusterd_bricks_select_heal_volume (dict_t *dict, char **op_errstr, glusterd_pending_node_t *pending_node = NULL; gf_xl_afr_op_t heal_op = GF_AFR_OP_INVALID; int rxlator_count = 0; - dict_t *op_ctx = NULL; this = THIS; GF_ASSERT (this); @@ -4412,9 +4412,13 @@ glusterd_bricks_select_heal_volume (dict_t *dict, char **op_errstr, if (!glusterd_is_nodesvc_online ("glustershd") && (heal_op == GF_AFR_OP_INDEX_SUMMARY)) { - op_ctx = glusterd_op_get_ctx (); + if (!rsp_dict) { + gf_log (this->name, GF_LOG_ERROR, "Received empty " + "ctx."); + goto out; + } - ret = fill_shd_status_for_local_bricks (op_ctx, volinfo); + ret = fill_shd_status_for_local_bricks (rsp_dict, volinfo); if (ret) gf_log (this->name, GF_LOG_ERROR, "Unable to fill the shd" " status for the local bricks"); @@ -4764,7 +4768,7 @@ out: int32_t glusterd_op_bricks_select (glusterd_op_t op, dict_t *dict, char **op_errstr, - struct list_head *selected) + struct list_head *selected, dict_t *rsp_dict) { int ret = 0; @@ -4791,7 +4795,7 @@ glusterd_op_bricks_select (glusterd_op_t op, dict_t *dict, char **op_errstr, case GD_OP_HEAL_VOLUME: ret = glusterd_bricks_select_heal_volume (dict, op_errstr, - selected); + selected, rsp_dict); break; case GD_OP_STATUS_VOLUME: |