summaryrefslogtreecommitdiffstats
path: root/xlators/performance/readdir-ahead/src/readdir-ahead.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/performance/readdir-ahead/src/readdir-ahead.c')
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 82e877512c5..8f5a1f44ca5 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -636,6 +636,8 @@ reconfigure(xlator_t *this, dict_t *options)
size_uint64, err);
GF_OPTION_RECONF("rda-cache-limit", priv->rda_cache_limit, options,
size_uint64, err);
+ GF_OPTION_RECONF("parallel-readdir", priv->parallel_readdir, options,
+ bool, err);
return 0;
err:
@@ -681,6 +683,8 @@ init(xlator_t *this)
err);
GF_OPTION_INIT("rda-cache-limit", priv->rda_cache_limit, size_uint64,
err);
+ GF_OPTION_INIT("parallel-readdir", priv->parallel_readdir, bool,
+ err);
return 0;
@@ -748,6 +752,17 @@ struct volume_options options[] = {
"value, irrespective of the number/size of "
"directories cached",
},
+ { .key = {"parallel-readdir"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .op_version = {GD_OP_VERSION_3_10_0},
+ .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
+ .default_value = "off",
+ .description = "If this option is enabled, the readdir operation "
+ "is performed in parallel on all the bricks, thus "
+ "improving the performance of readdir. Note that "
+ "the performance improvement is higher in large "
+ "clusters"
+ },
{ .key = {NULL} },
};