summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-03-17 09:32:17 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-04-17 07:11:23 -0700
commit80fd2a0d8b3da20755a38195f62fc4d7fc5f7b52 (patch)
treea381f7b6e7459f4f5389d5bd984f51fec65f4065 /xlators/cluster/afr/src/afr.c
parent20300fa96802ec6a0cd17edba38baf9639561d55 (diff)
cluster/afr: Use parallel dir scan functionality
>BUG: 1221737 >Change-Id: I0ed71a72f0e33bd733723e00a01cf28378c5534e >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13755 >Reviewed-on: http://review.gluster.org/13992 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1325857 Change-Id: I7c6b2ea065edd7f5dafffeb42fd6c601b4ab8d14 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14010 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/cluster/afr/src/afr.c')
-rw-r--r--xlators/cluster/afr/src/afr.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 49ce495ff5f..c47e6377a4c 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -221,6 +221,12 @@ reconfigure (xlator_t *this, dict_t *options)
GF_OPTION_RECONF ("consistent-metadata", priv->consistent_metadata,
options, bool, out);
+ GF_OPTION_RECONF ("shd-max-threads", priv->shd.max_threads,
+ options, uint32, out);
+
+ GF_OPTION_RECONF ("shd-wait-qlength", priv->shd.wait_qlength,
+ options, uint32, out);
+
priv->did_discovery = _gf_false;
ret = 0;
@@ -331,6 +337,11 @@ init (xlator_t *this)
fav_child->name, fav_child->name);
}
+ GF_OPTION_INIT ("shd-max-threads", priv->shd.max_threads,
+ uint32, out);
+
+ GF_OPTION_INIT ("shd-wait-qlength", priv->shd.wait_qlength,
+ uint32, out);
GF_OPTION_INIT ("background-self-heal-count",
priv->background_self_heal_count, uint32, out);
@@ -833,5 +844,23 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_INT,
.description = "subset of child_count. Has to be 0 or 1."
},
+ { .key = {"shd-max-threads"},
+ .type = GF_OPTION_TYPE_INT,
+ .min = 1,
+ .max = 64,
+ .default_value = "1",
+ .description = "Maximum number of threads SHD can use per local "
+ "brick. This can substantially lower heal times, "
+ "but can also crush your bricks if you don't have "
+ "the storage hardware to support this."
+ },
+ { .key = {"shd-wait-qlength"},
+ .type = GF_OPTION_TYPE_INT,
+ .min = 1,
+ .max = 655536,
+ .default_value = "1024",
+ .description = "This option can be used to control number of heals"
+ " that can wait in SHD per subvolume",
+ },
{ .key = {NULL} },
};