diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2015-06-17 14:20:14 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2015-06-25 01:11:17 -0700 |
commit | b9ab4e3e34de242452898913e6413d8ee97d6556 (patch) | |
tree | e6a0fb2c5520a5dc18472844002fd23daa3db93c | |
parent | 7b7e82f8770643e9edd5650340a387ea70e771f2 (diff) |
glusterd: fix quorum calculation logic
backport of http://review.gluster.org/11275
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: 1235512
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>
(cherry picked from commit 0be38bdb4007c1bcb51545057e6402f6e14922cd)
Reviewed-on: http://review.gluster.org/11393
Tested-by: Gluster Build System <jenkins@build.gluster.com>
-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 8d8acb17513..f3278af8d9c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-server-quorum.c +++ b/xlators/mgmt/glusterd/src/glusterd-server-quorum.c @@ -217,11 +217,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)) @@ -244,7 +239,7 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, *quorum_count = count; ret = 0; -out: + return ret; } |