summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorPranith Kumar K <pranithk@gluster.com>2012-09-26 12:31:15 +0530
committerAnand Avati <avati@redhat.com>2012-10-01 12:39:36 -0700
commitdd8eb06e26138e149252365043706067782416af (patch)
tree64336015b9ae4588249dc0e4b6a6eeed67884d2a /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent947523a74c97b057b8bcfdf2c65943495ab118d2 (diff)
cluster/afr: Provide option to set readdir-size in entry-self-heal
Problem: Entry self-heal does lookups on all the entries that are read in readdir. More the size of readdir more number of lookups happen in parallel. It is observed that it leads to HUGE cpu spikes rendering everything else on the system unusable. Fix: Provided the option self-heal-readdir-size to configure the size. Default value is at 1KB. Tests: Checked that the readdirs are happening with the configured value in entry-self-heal. Change-Id: Icaa937ad88857e6f9a12375b1e7f6a49192bc8b1 BUG: 860895 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/4002 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 882b96cd..685470d6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -132,6 +132,7 @@ static struct volopt_map_entry glusterd_volopt_map[] = {
{"cluster.quorum-type", "cluster/replicate", "quorum-type", NULL, NO_DOC, 0},
{"cluster.quorum-count", "cluster/replicate", "quorum-count", NULL, NO_DOC, 0},
{"cluster.choose-local", "cluster/replicate", NULL, NULL, DOC, 0},
+ {"cluster.self-heal-readdir-size", "cluster/replicate", NULL, NULL, NO_DOC, 0},
{"cluster.stripe-block-size", "cluster/stripe", "block-size", NULL, DOC, 0},
{"cluster.stripe-coalesce", "cluster/stripe", "coalesce", NULL, DOC, 0},
@@ -2558,13 +2559,13 @@ shd_option_handler (volgen_graph_t *graph, struct volopt_map_entry *vme,
struct volopt_map_entry new_vme = {0};
char *shd_option = NULL;
- if (vme->option[0] != '!')
- goto out;
shd_option = gd_get_matching_option (gd_shd_options, vme->option);
- if (!shd_option)
+ if ((vme->option[0] == '!') && !shd_option)
goto out;
new_vme = *vme;
- new_vme.option = shd_option + 1;//option with out '!'
+ if (shd_option) {
+ new_vme.option = shd_option + 1;//option with out '!'
+ }
ret = no_filter_option_handler (graph, &new_vme, param);
out: