summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authornik-redhat <nladha@redhat.com>2020-08-04 06:37:00 +0530
committerMOHIT AGRAWAL <moagrawa@redhat.com>2020-09-08 09:54:20 +0000
commitaec219826ef265ee287a642e1341ddf4f97fe478 (patch)
tree38062999dd3e3c9e4e86ab4806b40d7f3594b3f9 /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent0935afb947e520fd8e41ebfc311888eafc6afdc0 (diff)
glusterd: automatically turn on dependencies for parallel-readdir
Issue: On setting the performance.parallel-readdir to "on" the dependencies of it should automatically be turned on and readdir-ahead should be the parent of each dht subvolume. Fix: On enabling the parallel-readdir, the dependencies are turned on by enabling readdir-ahead simultaneously, and readdir-ahead will be seen as the parent of each dht subvolume. Fixes: #1416 Change-Id: Ic83ae470152b88edddc274d5e6c4d74169d23c15 Signed-off-by: nik-redhat <nladha@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 087be91..00d9338 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3359,6 +3359,9 @@ volgen_link_bricks(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if ((i % sub_count) == 0) {
xl = volgen_graph_add_nolink(graph, xl_type, xl_namefmt, volname,
j);
+ if (strncmp(xl_type, "performance/readdir-ahead",
+ SLEN("performance/readdir-ahead")) == 0)
+ xlator_set_fixed_option(xl, "performance.readdir-ahead", "on");
j++;
}
if (!xl) {
@@ -3593,13 +3596,13 @@ volgen_graph_build_readdir_ahead(volgen_graph_t *graph,
int32_t clusters = 0;
if (graph->type == GF_QUOTAD || graph->type == GF_SNAPD ||
- !glusterd_volinfo_get_boolean(volinfo, VKEY_PARALLEL_READDIR) ||
- !glusterd_volinfo_get_boolean(volinfo, VKEY_READDIR_AHEAD))
+ !glusterd_volinfo_get_boolean(volinfo, VKEY_PARALLEL_READDIR))
goto out;
clusters = volgen_link_bricks_from_list_tail(
graph, volinfo, "performance/readdir-ahead", "%s-readdir-ahead-%d",
child_count, 1);
+
out:
return clusters;
}