From e66add8a304ca610b74ecbbe48cec72dba582340 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 4 May 2016 19:05:28 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/14211 Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Reviewed-by: Ravishankar N --- xlators/cluster/afr/src/afr-self-heald.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-self-heald.c b/xlators/cluster/afr/src/afr-self-heald.c index 2ec9d9ce686..545ffa0a1d7 100644 --- a/xlators/cluster/afr/src/afr-self-heald.c +++ b/xlators/cluster/afr/src/afr-self-heald.c @@ -430,10 +430,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, @@ -449,7 +456,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); @@ -461,6 +468,8 @@ out: if (xdata) dict_unref (xdata); + if (frame) + AFR_STACK_DESTROY (frame); return ret; } -- cgit