diff options
Diffstat (limited to 'xlators/cluster/afr')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 6 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 23 |
2 files changed, 16 insertions, 13 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 24366d17ac1..923afc804be 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2235,12 +2235,14 @@ afr_lookup_selfheal_wrap (void *opaque) afr_local_t *local = NULL; xlator_t *this = NULL; inode_t *inode = NULL; + uuid_t pargfid = {0,}; local = frame->local; this = frame->this; + loc_pargfid (&local->loc, pargfid); - ret = afr_selfheal_name (frame->this, local->loc.pargfid, - local->loc.name, &local->cont.lookup.gfid_req); + ret = afr_selfheal_name (frame->this, pargfid, local->loc.name, + &local->cont.lookup.gfid_req); if (ret == -EIO) goto unwind; diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index be388abc93c..b4641043c38 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -776,6 +776,16 @@ afr_handle_quorum (call_frame_t *frame) if (afr_has_fop_cbk_quorum (frame)) return; + for (i = 0; i < priv->child_count; i++) { + if (local->transaction.pre_op[i]) + afr_transaction_fop_failed (frame, frame->this, i); + } + + local->op_ret = -1; + local->op_errno = afr_final_errno (local, priv); + if (local->op_errno == 0) + local->op_errno = afr_quorum_errno (priv); + if (local->fd) { gf_uuid_copy (gfid, local->fd->inode->gfid); file = uuid_utoa (gfid); @@ -784,19 +794,10 @@ afr_handle_quorum (call_frame_t *frame) file = local->loc.path; } - gf_msg (frame->this->name, GF_LOG_WARNING, 0, AFR_MSG_QUORUM_FAIL, - "%s: Failing %s as quorum is not met", + gf_msg (frame->this->name, GF_LOG_WARNING, local->op_errno, + AFR_MSG_QUORUM_FAIL, "%s: Failing %s as quorum is not met", file, gf_fop_list[local->op]); - for (i = 0; i < priv->child_count; i++) { - if (local->transaction.pre_op[i]) - afr_transaction_fop_failed (frame, frame->this, i); - } - - local->op_ret = -1; - local->op_errno = afr_final_errno (local, priv); - if (local->op_errno == 0) - local->op_errno = afr_quorum_errno (priv); switch (local->transaction.type) { case AFR_ENTRY_TRANSACTION: case AFR_ENTRY_RENAME_TRANSACTION: |