summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2017-06-25 21:50:09 +0530
committerNiels de Vos <ndevos@redhat.com>2017-07-10 07:42:29 +0000
commit3d5ef4e2cf31f611e3cbcd865c0367bab44a9552 (patch)
treed49ef0457d9d78bd58906608ba21ad8be5de2699
parentcfba812b3e16202249ec70b45d466ffe8b26344f (diff)
glfsheal: prevent background self-heals
Problem: For a file in gfid split-brain, the parent directory ('/' during testing) was detected as possibly undergoing heal instead of split-brain in `heal-info` output. Also, it was not being displayed in `info split-brain` output for the same reason. The problem was that when `glfsheal` was run, lookup on '/' triggered a background self-heal due to which processing of '/' during `heal info` failed to acquire locks with errno=EAGAIN. Fix: Set background-self-heal-count to zero while launching glfsheal. > Reviewed-on: https://review.gluster.org/13772 > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> (cherry picked from commit b4db625d0ccb4fdc6537ed9f6e8ebeaffd1c4873) Change-Id: I153a7c75af71f213a4eefacf504a0f9806c528a5 BUG: 1467272 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: https://review.gluster.org/17678 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--heal/src/glfs-heal.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c
index c65682a5517..8236c693b8e 100644
--- a/heal/src/glfs-heal.c
+++ b/heal/src/glfs-heal.c
@@ -876,6 +876,11 @@ glfsh_set_heal_options (glfs_t *fs, gf_xl_afr_op_t heal_op)
{
int ret = 0;
+ ret = glfs_set_xlator_option (fs, "*-replicate-*",
+ "background-self-heal-count", "0");
+ if (ret)
+ goto out;
+
if ((heal_op != GF_SHD_OP_SBRAIN_HEAL_FROM_BIGGER_FILE) &&
(heal_op != GF_SHD_OP_SBRAIN_HEAL_FROM_BRICK) &&
(heal_op != GF_SHD_OP_SBRAIN_HEAL_FROM_LATEST_MTIME))
@@ -892,6 +897,7 @@ glfsh_set_heal_options (glfs_t *fs, gf_xl_afr_op_t heal_op)
ret = glfs_set_xlator_option (fs, "*-replicate-*", "entry-self-heal",
"on");
+
out:
return ret;
}