diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2014-09-23 12:43:02 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2014-09-23 07:21:44 -0700 |
commit | e149a051bf226e16c6b7f1a816f998dace85d33d (patch) | |
tree | 8b454f6b00281aaf99dbf69c0c726f0ba2f493ea /xlators/cluster/afr/src/afr-self-heal-name.c | |
parent | 371bb42410ca5bbcf1f13ad1c8d015fcbe6ec5ce (diff) |
cluster/afr: Don't start heal when lookup succeeds on < 2 children
Problem:
When self-heal code doesn't see at least 2 successes on looking up children,
then self-heal can't be done. What is happening now is if all the lookups fail
then the pending changelog is all zeros in xattrs so all the children are
becoming sources and leading to crashes when the code paths further assume that
some data structures are populated properly
Fix:
Don't proceed with self-heals when < 2 children succeed lookups.
BUG: 1128721
Change-Id: Iffdf0feebb6f98812d9d01cdd0cf97f3e19ba76f
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8698
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-name.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-name.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-name.c b/xlators/cluster/afr/src/afr-self-heal-name.c index a3020f4e1a7..c5d126185c7 100644 --- a/xlators/cluster/afr/src/afr-self-heal-name.c +++ b/xlators/cluster/afr/src/afr-self-heal-name.c @@ -571,7 +571,7 @@ afr_selfheal_name_do (call_frame_t *frame, xlator_t *this, inode_t *parent, ret = afr_selfheal_entrylk (frame, this, parent, this->name, bname, locked_on); { - if (ret < 2) { + if (ret < AFR_SH_MIN_PARTICIPANTS) { ret = -ENOTCONN; goto unlock; } |