readdir-ahead: Add parallel-readdir option in readdir-ahead

parallel-readdir option is defined as belonging to readdir-ahead
in glusterd-volume-set.c, but was not defined in options of
readdir-ahead, fixing the same.

Change-Id: I97cc88b38ab99ade5f066519ca1cb9bfed03a7da
BUG: 1506197
Signed-off-by: Poornima G <pgurusid@redhat.com>
This commit is contained in:
Poornima G 2017-10-25 17:00:36 +05:30 committed by Amar Tumballi
parent e6feebbb52
commit 80a6a2357c
2 changed files with 16 additions and 0 deletions

View File

@ -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} },
};

View File

@ -45,6 +45,7 @@ struct rda_priv {
uint64_t rda_high_wmark;
uint64_t rda_cache_limit;
gf_atomic_t rda_cache_size;
gf_boolean_t parallel_readdir;
};
#endif /* __READDIR_AHEAD_H */