From b9ab4e3e34de242452898913e6413d8ee97d6556 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Wed, 17 Jun 2015 14:20:14 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/11275 Reviewed-by: Krishnan Parthasarathi Reviewed-by: Anand Nekkunti Tested-by: NetBSD Build System (cherry picked from commit 0be38bdb4007c1bcb51545057e6402f6e14922cd) Reviewed-on: http://review.gluster.org/11393 Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-server-quorum.c | 7 +------ 1 file changed, 1 insertion(+), 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; } -- cgit