summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/ec/src/ec-heald.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-08-04 00:41:16 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-08-24 15:24:22 -0700
commit56a79b357e09d91305994fcc0b2d250cb9ac243d (patch)
treede4b9d764c16f1ee2298ef49dce481f2e1efa726 /xlators/cluster/ec/src/ec-heald.c
parent1edea9534dfaf95873921a77e40ae73a0d6e4c39 (diff)
cluster/ec: Do multi-threaded self-heal
BUG: 1368451 Change-Id: I5d6b91d714ad6906dc478a401e614115c89a8fbb Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15083 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ashish Pandey <aspandey@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/cluster/ec/src/ec-heald.c')
-rw-r--r--xlators/cluster/ec/src/ec-heald.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index 0e8076826c6..c87f328db0f 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -275,6 +275,7 @@ ec_shd_index_sweep (struct subvol_healer *healer)
ec_t *ec = NULL;
int ret = 0;
xlator_t *subvol = NULL;
+ dict_t *xdata = NULL;
ec = healer->this->private;
subvol = ec->xl_list[healer->subvol];
@@ -287,9 +288,18 @@ ec_shd_index_sweep (struct subvol_healer *healer)
goto out;
}
- ret = syncop_dir_scan (subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
- healer, ec_shd_index_heal);
+ xdata = dict_new ();
+ if (!xdata || dict_set_int32 (xdata, "get-gfid-type", 1)) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ ret = syncop_mt_dir_scan (NULL, subvol, &loc, GF_CLIENT_PID_SELF_HEALD,
+ healer, ec_shd_index_heal, xdata,
+ ec->shd.max_threads, ec->shd.wait_qlength);
out:
+ if (xdata)
+ dict_unref (xdata);
loc_wipe (&loc);
return ret;