diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2016-05-17 06:38:57 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-05-18 22:14:34 -0700 |
commit | 0660aa47b5ea782a5f7051544110cf0da73d598d (patch) | |
tree | 58af2d0ced4713ec34c1f074870d46f154b145a4 /xlators/cluster/afr/src | |
parent | b923f8c08f9401e8301ac53c79231051c2d0fb00 (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 <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/14369
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src')
-rw-r--r-- | xlators/cluster/afr/src/afr-transaction.c | 4 |
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 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 |