From db0b19a5420d417cf4da70bf886b53619e17a739 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 27 Aug 2013 13:42:41 +0530 Subject: cluster/afr: Add special handling for failure postops Idea is to not leave the file in FOOL-FOOL scenario in case on all the bricks data transaction failed with EDQUOT to avoid increasing un-necessary load of self-heals in the system. For directory transactions don't leave pending changelog in case the failures are seen on all the subvolumes. Change-Id: I38a5561d1d581a78347a76a4a509514e4a0c3fb7 BUG: 969461 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/5709 Reviewed-by: Anand Avati Tested-by: Gluster Build System --- xlators/cluster/afr/src/afr-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators/cluster/afr/src/afr-common.c') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 691c1d4d7b3..840025e793c 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2908,8 +2908,10 @@ afr_fallocate_wind_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local->read_child_returned = _gf_true; } - if (afr_fop_failed (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) { afr_transaction_fop_failed (frame, this, child_index); + local->child_errno[child_index] = op_errno; + } if (op_ret != -1) { if (local->success_count == 0) { @@ -3152,8 +3154,10 @@ afr_discard_wind_cbk(call_frame_t *frame, void *cookie, xlator_t *this, local->read_child_returned = _gf_true; } - if (afr_fop_failed (op_ret, op_errno)) + if (afr_fop_failed (op_ret, op_errno)) { afr_transaction_fop_failed (frame, this, child_index); + local->child_errno[child_index] = op_errno; + } if (op_ret != -1) { if (local->success_count == 0) { -- cgit