path: root/xlators
diff options
authorPranith Kumar K <>2016-05-17 06:38:57 +0530
committerPranith Kumar Karampuri <>2016-05-20 04:39:43 -0700
commitccb463647eaba1798943e1eb9ce6e6b3fa2e71c2 (patch)
tree8e40a83e3a85ca4891f1cee44e65ad6e1f01aed6 /xlators
parentfdf91b713658b83936383dc53b0f241876f5ead1 (diff)
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: >Smoke: Gluster Build System <> >NetBSD-regression: NetBSD Build System <> >CentOS-regression: Gluster Build System <> >Reviewed-by: Ravishankar N <> BUG: 1337831 Change-Id: I18979db118911e588da318094b2d22f5d426efd5 Signed-off-by: Pranith Kumar K <> Reviewed-on: Reviewed-by: Ravishankar N <> Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> CentOS-regression: Gluster Build System <>
Diffstat (limited to 'xlators')
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 59d03e3ed9e..908c6bea0b7 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -691,7 +691,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);