summaryrefslogtreecommitdiffstats
path: root/xlators/performance/readdir-ahead/src/readdir-ahead.c
diff options
context:
space:
mode:
authorAravinda VK <avishwan@redhat.com>2018-12-06 15:09:26 +0530
committerAtin Mukherjee <amukherj@redhat.com>2018-12-07 05:28:23 +0000
commit40a9e53a44e887658fade3f03afc018e82b941b9 (patch)
treeb3507afcb2aae141a23e4919f31ac24a847a5585 /xlators/performance/readdir-ahead/src/readdir-ahead.c
parentf168db1da76775f11026c922a51a718b54abc4c9 (diff)
New xlator option to control enable/disable of xlators in Gd2
Since glusterd2 don't maintain the xlator option details in code, it directly reads the xlators options table from `*.so` files. To support enable and disable of xlator new option added to the option table with the name same as xlator name itself. This change will not affect the functionality with glusterd1. Change-Id: I23d9e537f3f422de72ddb353484466d3519de0c1 updates: #302 Signed-off-by: Aravinda VK <avishwan@redhat.com>
Diffstat (limited to 'xlators/performance/readdir-ahead/src/readdir-ahead.c')
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c
index 3a030ecbdc8..dee977c6e21 100644
--- a/xlators/performance/readdir-ahead/src/readdir-ahead.c
+++ b/xlators/performance/readdir-ahead/src/readdir-ahead.c
@@ -1230,6 +1230,14 @@ struct xlator_cbks cbks = {
struct volume_options options[] = {
{
+ .key = {"readdir-ahead"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "off",
+ .description = "enable/disable readdir-ahead",
+ .op_version = {GD_OP_VERSION_6_0},
+ .flags = OPT_FLAG_SETTABLE,
+ },
+ {
.key = {"rda-request-size"},
.type = GF_OPTION_TYPE_SIZET,
.min = 4096,