diff options
Diffstat (limited to 'xlators/cluster/afr/src/afr-transaction.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 9c0963781e3..bfea096cf3b 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -2452,7 +2452,7 @@ afr_write_txn_refresh_done (call_frame_t *frame, xlator_t *this, int err) afr_local_t *local = frame->local; if (err) { - AFR_SET_ERROR_AND_CHECK_SPLIT_BRAIN(-1, -err); + AFR_SET_ERROR_AND_CHECK_SPLIT_BRAIN(-1, err); goto fail; } @@ -2478,6 +2478,11 @@ 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)) { + ret = -afr_quorum_errno(priv); + goto out; + } + if (!afr_is_consistent_io_possible (local, priv, &ret)) { ret = -ret; /*op_errno to ret conversion*/ goto out; |