summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handler.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-03-24 11:27:52 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-03-26 00:10:45 -0700
commit087ad8a001c77ec9703a0a74256819cf99cc31d4 (patch)
treeb5feadc3a57573fa15d052150286b5475b7c1597 /xlators/mgmt/glusterd/src/glusterd-handler.c
parentf64666f113e7f0d3f7061dfed7e6e24928e85161 (diff)
glusterd: Maintain local xaction_peer list for op-sm
http://review.gluster.org/9269 addresses maintaining local xaction_peers in syncop and mgmt_v3 framework. This patch is to maintain local xaction_peers list for op-sm framework as well. Change-Id: Idd8484463fed196b3b18c2df7f550a3302c6e138 BUG: 1204727 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9972 Reviewed-by: Anand Nekkunti <anekkunt@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/glusterd-handler.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 399b0629708..52143bb3fb8 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -625,10 +625,21 @@ glusterd_op_txn_begin (rpcsvc_request_t *req, glusterd_op_t op, void *ctx,
gf_log (this->name, GF_LOG_DEBUG, "Acquired lock on localhost");
local_locking_done:
+ txn_op_info.local_xaction_peers =
+ GF_CALLOC (1, sizeof (struct cds_list_head *),
+ gf_common_mt_list_head_t);
+ if (!txn_op_info.local_xaction_peers) {
+ ret = -1;
+ gf_log (this->name, GF_LOG_ERROR, "Out of memory");
+ goto out;
+ }
+ CDS_INIT_LIST_HEAD (txn_op_info.local_xaction_peers);
- CDS_INIT_LIST_HEAD (&priv->xaction_peers);
-
- npeers = gd_build_peers_list (&priv->peers, &priv->xaction_peers, op);
+ /* Maintain xaction_peers on per transaction basis */
+ npeers = gd_build_local_xaction_peers_list
+ (&priv->peers,
+ txn_op_info.local_xaction_peers,
+ op);
/* If no volname is given as a part of the command, locks will
* not be held, hence sending stage event. */