diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2015-06-17 14:20:14 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2015-06-24 20:30:13 -0700 |
commit | 0be38bdb4007c1bcb51545057e6402f6e14922cd (patch) | |
tree | 529c5488d50756c7fbdbb314e615f761791931c3 /xlators/mgmt/glusterd/src/glusterd-server-quorum.c | |
parent | b5fd1bca37ce612f825295ed03ac0544cf7e0b69 (diff) |
glusterd: fix quorum calculation logic
glusterd_get_quorum_cluster_counts () skips quorum calculation if it finds any
of its peer in QUORUM_WAITING state. This means if any peer probe has been
triggered and at the same point of time a transaction has been initiated, it
might pass through the server quorum check which it should not.
Change-Id: I44eda8905eab3349c9ebf2842e7131d4e758a528
BUG: 1232686
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/11275
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Anand Nekkunti <anekkunt@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-server-quorum.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c index 9f7d947b7ee..61623f4167a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -212,11 +212,6 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, rcu_read_lock (); cds_list_for_each_entry_rcu (peerinfo, &conf->peers, uuid_list) { - if (peerinfo->quorum_contrib == QUORUM_WAITING) { - rcu_read_unlock (); - goto out; - } - if (_is_contributing_to_quorum (peerinfo->quorum_contrib)) inquorum_count = inquorum_count + 1; if (active_count && (peerinfo->quorum_contrib == QUORUM_UP)) @@ -239,7 +234,7 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, *quorum_count = count; ret = 0; -out: + return ret; } |