summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2017-04-13 13:20:18 +0530
committerJeff Darcy <jeff@pl.atyp.us>2017-04-13 14:15:14 -0400
commit090c8866eb3ae174be50dec8d9d5ecf978d18a45 (patch)
treee1f2e43a949ef4702cd4d194d537249c13ce55ed /xlators/mgmt
parentaf218797fa98f2f75594fc9ae595f184682f1a0d (diff)
glusterd: fix glusterd_wait_for_blockers to go in infinite loop
In send_attach_req () conf->blockers is bumped up before rpc_clnt_submit however the same is bumped down twice, one from the callback and one from the negative ret handling which can very well be a possible case if the rpc submit fails. Change-Id: Icb820694034cbfcb3d427911e192ac4a0f4540f6 BUG: 1441910 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/17055 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 96446f0a225..91a4087c4b2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -4991,9 +4991,6 @@ send_attach_req (xlator_t *this, struct rpc_clnt *rpc, char *path, int op)
ret = rpc_clnt_submit (rpc, &gd_brick_prog, op,
my_callback, &iov, 1, NULL, 0, iobref,
frame, NULL, 0, NULL, 0, NULL);
- if (ret) {
- --(conf->blockers);
- }
return ret;
free_iobref:
@@ -5432,13 +5429,12 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
gf_boolean_t node_quorum = _gf_false;
this = THIS;
- GF_VALIDATE_OR_GOTO ("glusterd", this, out);
+ GF_VALIDATE_OR_GOTO ("glusterd", this, return_block);
conf = this->private;
- GF_VALIDATE_OR_GOTO (this->name, conf, out);
+ GF_VALIDATE_OR_GOTO (this->name, conf, return_block);
++(conf->blockers);
-
ret = glusterd_get_quorum_cluster_counts (this, &active_count,
&quorum_count);
if (ret)
@@ -5520,6 +5516,8 @@ glusterd_restart_bricks (glusterd_conf_t *conf)
out:
--(conf->blockers);
conf->restart_done = _gf_true;
+
+return_block:
return ret;
}