summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index 1deb15d5e2f..3249dbc006c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -613,7 +613,8 @@ out:
}
int
-gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers)
+gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers,
+ glusterd_op_t op)
{
glusterd_peerinfo_t *peerinfo = NULL;
int npeers = 0;
@@ -621,7 +622,8 @@ gd_build_peers_list (struct list_head *peers, struct list_head *xact_peers)
list_for_each_entry (peerinfo, peers, uuid_list) {
if (!peerinfo->connected)
continue;
- if (peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED)
+ if (op != GD_OP_SYNC_VOLUME &&
+ peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED)
continue;
list_add_tail (&peerinfo->op_peers_list, xact_peers);
npeers++;
@@ -767,12 +769,14 @@ gd_commit_op_phase (struct list_head *peers, glusterd_op_t op, dict_t *op_ctx,
hostname = "localhost";
goto commit_done;
}
- ret = glusterd_syncop_aggr_rsp_dict (op, op_ctx, rsp_dict);
- if (ret) {
- gf_log (this->name, GF_LOG_ERROR, "%s",
- (*op_errstr)? *op_errstr: "Failed to aggregate response "
- "from node/brick");
- goto out;
+ if (op != GD_OP_SYNC_VOLUME) {
+ ret = glusterd_syncop_aggr_rsp_dict (op, op_ctx, rsp_dict);
+ if (ret) {
+ gf_log (this->name, GF_LOG_ERROR, "%s",
+ "Failed to aggregate response "
+ "from node/brick");
+ goto out;
+ }
}
dict_unref (rsp_dict);
rsp_dict = NULL;
@@ -893,9 +897,11 @@ gd_brick_op_phase (glusterd_op_t op, dict_t *op_ctx, dict_t *req_dict, char **op
goto out;
}
- ret = glusterd_syncop_aggr_rsp_dict (op, op_ctx, rsp_dict);
- if (ret)
- goto out;
+ if (op == GD_OP_HEAL_VOLUME) {
+ ret = glusterd_syncop_aggr_rsp_dict (op, op_ctx, rsp_dict);
+ if (ret)
+ goto out;
+ }
dict_unref (rsp_dict);
rsp_dict = NULL;
@@ -970,7 +976,7 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
* the 'cluster' lock*/
glusterd_op_set_op (op);
INIT_LIST_HEAD (&conf->xaction_peers);
- npeers = gd_build_peers_list (&conf->peers, &conf->xaction_peers);
+ npeers = gd_build_peers_list (&conf->peers, &conf->xaction_peers, op);
ret = gd_lock_op_phase (&conf->xaction_peers, op, op_ctx, &op_errstr, npeers);
if (ret)