From 78cfd326e23d07d199ea25cfc6c1330320ae89b0 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 17 May 2016 06:38:57 +0530 Subject: cluster/afr: If possible give errno received from lower xlators In case of 3 way replication with quorum enabled with sharding, if one bricks is brought down and brought back up sometimes fops fail with EROFS because the mknod of shard file fails with two good nodes with EEXIST. So even when quorum is not met, it makes sense to unwind with the errno returned by lower xlators as much as possible. >Change-Id: Iabd91cd7c270f5dfe6cbd18c50e59c299a331552 >BUG: 1336612 >Signed-off-by: Pranith Kumar K >Reviewed-on: http://review.gluster.org/14369 >Smoke: Gluster Build System >NetBSD-regression: NetBSD Build System >CentOS-regression: Gluster Build System >Reviewed-by: Ravishankar N BUG: 1337822 Change-Id: Ic2450d34d3bf1fb6be754ce890aeca960fe7ad1f Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/14448 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Anuradha Talur Reviewed-by: Niels de Vos --- xlators/cluster/afr/src/afr-transaction.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index ef5cb56279f..ff2b58c032d 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -744,7 +744,9 @@ afr_handle_quorum (call_frame_t *frame) } local->op_ret = -1; - local->op_errno = afr_quorum_errno (priv); + local->op_errno = afr_final_errno (local, priv); + if (local->op_errno == 0) + local->op_errno = afr_quorum_errno (priv); } int -- cgit