summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-03-29 19:59:19 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-03-29 19:46:00 -0700
commit3b647e10124cfc22983b11bf9bfaa36289a2a42f (patch)
treec0e776ff2cf8bad21ea5fbb794578dc73413642c /xlators/mgmt/glusterd/src
parentd5a9607598cf02e50bce306cffe97990a50129c0 (diff)
glusterd: Use txn_opinfo instead of global op_info in glusterd_volume_heal_use_rsp_dict
Due to http://review.gluster.org/#/c/9908/ global opinfo is no more a valid place holder for keeping transaction information for syncop task. glusterd_volume_heal_use_rsp_dict () was referring to global op_info due to which the function was always asserting on the op code. Change-Id: I1d416fe4edb40962fe7a0f6ecf541602debac56e BUG: 1206655 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/10034 Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index d9e22125a3a..243703786e9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -8302,20 +8302,35 @@ out:
int
glusterd_volume_heal_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict)
{
- int ret = 0;
- dict_t *ctx_dict = NULL;
- glusterd_op_t op = GD_OP_NONE;
+ int ret = 0;
+ dict_t *ctx_dict = NULL;
+ uuid_t *txn_id = NULL;
+ glusterd_op_info_t txn_op_info = {{0},};
+ glusterd_op_t op = GD_OP_NONE;
GF_ASSERT (rsp_dict);
- op = glusterd_op_get_op ();
+ ret = dict_get_bin (aggr, "transaction_id", (void **)&txn_id);
+ if (ret)
+ goto out;
+ gf_log (THIS->name, GF_LOG_DEBUG, "transaction ID = %s",
+ uuid_utoa (*txn_id));
+
+ ret = glusterd_get_txn_opinfo (txn_id, &txn_op_info);
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to get txn_op_info "
+ "for txn_id = %s", uuid_utoa (*txn_id));
+ goto out;
+ }
+
+ op = txn_op_info.op;
GF_ASSERT (GD_OP_HEAL_VOLUME == op);
if (aggr) {
ctx_dict = aggr;
} else {
- ctx_dict = glusterd_op_get_ctx (op);
+ ctx_dict = txn_op_info.op_ctx;
}
if (!ctx_dict)