diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index ab3a121efe3..8d97ff53253 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -242,7 +242,7 @@ afr_changelog_has_quorum(afr_local_t *local, xlator_t *this) } } - if (afr_has_quorum(success_children, this)) { + if (afr_has_quorum(success_children, this, NULL)) { return _gf_true; } @@ -869,7 +869,7 @@ afr_handle_symmetric_errors(call_frame_t *frame, xlator_t *this) } gf_boolean_t -afr_has_quorum(unsigned char *subvols, xlator_t *this) +afr_has_quorum(unsigned char *subvols, xlator_t *this, call_frame_t *frame) { unsigned int quorum_count = 0; afr_private_t *priv = NULL; @@ -878,6 +878,9 @@ afr_has_quorum(unsigned char *subvols, xlator_t *this) priv = this->private; up_children_count = AFR_COUNT(subvols, priv->child_count); + if (afr_lookup_has_quorum(frame, this, subvols)) + return _gf_true; + if (priv->quorum_count == AFR_QUORUM_AUTO) { /* * Special case for auto-quorum with an even number of nodes. @@ -932,7 +935,7 @@ afr_has_fop_quorum(call_frame_t *frame) locked_nodes = afr_locked_nodes_get(local->transaction.type, &local->internal_lock); - return afr_has_quorum(locked_nodes, this); + return afr_has_quorum(locked_nodes, this, NULL); } static gf_boolean_t @@ -950,7 +953,7 @@ afr_has_fop_cbk_quorum(call_frame_t *frame) success[i] = 1; } - return afr_has_quorum(success, this); + return afr_has_quorum(success, this, NULL); } gf_boolean_t @@ -2882,7 +2885,7 @@ afr_transaction(call_frame_t *frame, xlator_t *this, afr_transaction_type type) local->transaction.type = type; - if (priv->quorum_count && !afr_has_quorum(local->child_up, this)) { + if (priv->quorum_count && !afr_has_quorum(local->child_up, this, NULL)) { ret = -afr_quorum_errno(priv); goto out; } |