diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2012-04-18 14:48:35 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-04-19 00:26:21 -0700 |
commit | 3ad81d490f9e822efa34b3ffaf3c527e99af5d40 (patch) | |
tree | 03fab2396a0c3fde472c871034018bd4621bd6dd /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | c284511c1ff7639ff674bca9260553680a917aa3 (diff) |
cluster/afr: Set errno correctly in find_fresh_parents failures
Change-Id: I923103a03c1efe38285cd70842ec91b98a3f6bfd
BUG: 765551
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3185
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 4 |
1 files changed, 3 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 5e961a39a..62dbfbaec 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -1711,6 +1711,7 @@ afr_sh_find_fresh_parents (call_frame_t *frame, xlator_t *this, gf_log (this->name, GF_LOG_ERROR, "No sources for dir " "of %s, in missing entry self-heal, aborting " "self-heal", local->loc.path); + op_errno = EIO; goto out; } @@ -1718,6 +1719,7 @@ afr_sh_find_fresh_parents (call_frame_t *frame, xlator_t *this, if (source == -1) { GF_ASSERT (0); gf_log (this->name, GF_LOG_DEBUG, "No active sources found."); + op_errno = EIO; goto out; } afr_get_fresh_children (sh->success_children, sh->sources, @@ -1728,7 +1730,7 @@ afr_sh_find_fresh_parents (call_frame_t *frame, xlator_t *this, return; out: - afr_sh_set_error (sh, EIO); + afr_sh_set_error (sh, op_errno); sh->op_failed = 1; afr_sh_missing_entries_finish (frame, this); return; |