summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-05-04 19:05:28 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-05-24 10:09:59 -0700
commit15c62e283dab7a1e84b875c9506613b716d05d51 (patch)
tree1502342fa53f2b618cf9140dd125b0d8e0d9caf8 /xlators
parent2de43f41b0d9a4e6b08447e86cc83ac3f4bc7684 (diff)
cluster/afr: Do heals with shd pid
Multi-threaded healing doesn't create synctask with shd pid, this leads to healing problems when quota exceeds. >BUG: 1332994 >Change-Id: I80f57c1923756f3298730b8820498127024e1209 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14211 >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> Change-Id: Id3f3ee44b27db7dbf94f3e7a9a6bfd7412d44ab8 BUG: 1335686 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14313 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>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-self-heald.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c
index d89692d3c61..2fc1b633d36 100644
--- a/xlators/cluster/afr/src/afr-self-heald.c
+++ b/xlators/cluster/afr/src/afr-self-heald.c
@@ -435,10 +435,17 @@ afr_shd_index_sweep (struct subvol_healer *healer, char *vgfid)
int ret = 0;
xlator_t *subvol = NULL;
dict_t *xdata = NULL;
+ call_frame_t *frame = NULL;
priv = healer->this->private;
subvol = priv->children[healer->subvol];
+ frame = afr_frame_create (healer->this);
+ if (!frame) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
loc.inode = afr_shd_index_inode (healer->this, subvol, vgfid);
if (!loc.inode) {
gf_msg (healer->this->name, GF_LOG_WARNING,
@@ -454,7 +461,7 @@ afr_shd_index_sweep (struct subvol_healer *healer, char *vgfid)
goto out;
}
- ret = syncop_mt_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
+ ret = syncop_mt_dir_scan (frame, subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
healer, afr_shd_index_heal, xdata,
priv->shd.max_threads, priv->shd.wait_qlength);
@@ -466,6 +473,8 @@ out:
if (xdata)
dict_unref (xdata);
+ if (frame)
+ AFR_STACK_DESTROY (frame);
return ret;
}