diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2012-12-12 15:11:35 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-02-03 11:56:18 -0800 |
commit | b070c7be6f687e197260a764abe4357d419b205c (patch) | |
tree | 185be76036730adf0122a30ba79a974d7595599e /xlators/mgmt/glusterd/src/glusterd-op-sm.c | |
parent | 2d0da44826d4b4652169604785ec63cce805bddd (diff) |
glusterd: Made volume-status use synctask framework
Change-Id: Id4062799104e5831467ced65a43bfe377b6163f4
BUG: 852147
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4297
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 | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 8c632ffbf01..fcccf480598 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1932,11 +1932,8 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr, if (ret) goto out; - if (!rsp_dict) { - //this should happen only on source + if (is_origin_glusterd ()) { ret = 0; - rsp_dict = glusterd_op_get_ctx (); - if ((cmd & GF_CLI_STATUS_ALL)) { ret = glusterd_get_all_volnames (rsp_dict); if (ret) @@ -2868,7 +2865,7 @@ out: * hostnames etc. */ void -glusterd_op_modify_op_ctx (glusterd_op_t op) +glusterd_op_modify_op_ctx (glusterd_op_t op, void *ctx) { int ret = -1; dict_t *op_ctx = NULL; @@ -2881,7 +2878,11 @@ glusterd_op_modify_op_ctx (glusterd_op_t op) this = THIS; GF_ASSERT (this); - op_ctx = glusterd_op_get_ctx(); + if (ctx) + op_ctx = ctx; + else + op_ctx = glusterd_op_get_ctx(); + if (!op_ctx) { gf_log (this->name, GF_LOG_CRITICAL, "Operation context is not present."); @@ -3129,7 +3130,7 @@ out: ret = glusterd_op_start_rb_timer (op_dict); } else { - glusterd_op_modify_op_ctx (op); + glusterd_op_modify_op_ctx (op, NULL); ret = glusterd_op_sm_inject_all_acc (); } goto err; @@ -3299,7 +3300,7 @@ out: if (ret) ret = glusterd_op_sm_inject_event (GD_OP_EVENT_RCVD_RJT, NULL); else if (!opinfo.pending_count) { - glusterd_op_modify_op_ctx (op); + glusterd_op_modify_op_ctx (op, NULL); ret = glusterd_op_sm_inject_event (GD_OP_EVENT_COMMIT_ACC, NULL); } /*else do nothing*/ |