path: root/xlators/cluster/afr/src/afr-self-heal-common.c
diff options
authorBrian Foster <>2013-01-10 10:49:17 -0500
committerAnand Avati <>2013-01-18 09:32:21 -0800
commit679cb2399fc1f8e97f2b29654ec422f267b03783 (patch)
treeadb9bb89d6c512ad57d8f0c07f2ad18426512d52 /xlators/cluster/afr/src/afr-self-heal-common.c
parent9036bd1a7bab68351c38d65cd6a1c8af150467bb (diff)
afr: conditionally prioritize EIO errors over ENOENT
The most important errno logic historically only prioritized ESTALE over ENOENT. Commit c8c0942d added EIO prioritization over ENOENT to ensure that split-brain was reported when it occurs in conjunction with bricks missing the file entry. The unintended side effect of this change is that (non split-brain) EIO errors reported from the bricks themselves are now reported to the client when the expectation is that afr should squash said errors in favor of marking the file inconsistent. The high-level problem is that EIO is overloaded with different meanings from different contexts. This commit adds an eio parameter to the errno priority logic to conditionally flag when EIO is of higher priority and should be propagated to the client. BUG: 892730 Change-Id: Ib692a8a1f1737ef190d57894f392ec53ffb33aab Signed-off-by: Brian Foster <> Reviewed-on: Reviewed-by: Jeff Darcy <> Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c
index e702608..f59a025 100644
--- a/xlators/cluster/afr/src/afr-self-heal-common.c
+++ b/xlators/cluster/afr/src/afr-self-heal-common.c
@@ -112,7 +112,8 @@ void
afr_sh_set_error (afr_self_heal_t *sh, int32_t op_errno)
sh->op_ret = -1;
- sh->op_errno = afr_most_important_error(sh->op_errno, op_errno);
+ sh->op_errno = afr_most_important_error(sh->op_errno, op_errno,
+ _gf_false);