diff options
author | Aravinda VK <avishwan@redhat.com> | 2018-12-06 15:09:26 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-12-07 05:28:23 +0000 |
commit | 40a9e53a44e887658fade3f03afc018e82b941b9 (patch) | |
tree | b3507afcb2aae141a23e4919f31ac24a847a5585 | |
parent | f168db1da76775f11026c922a51a718b54abc4c9 (diff) | |
download | glusterfs-40a9e53a44e887658fade3f03afc018e82b941b9.tar.gz glusterfs-40a9e53a44e887658fade3f03afc018e82b941b9.tar.xz glusterfs-40a9e53a44e887658fade3f03afc018e82b941b9.zip |
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>
-rw-r--r-- | xlators/features/shard/src/shard.c | 8 | ||||
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 8 | ||||
-rw-r--r-- | xlators/performance/md-cache/src/md-cache.c | 8 | ||||
-rw-r--r-- | xlators/performance/nl-cache/src/nl-cache.c | 8 | ||||
-rw-r--r-- | xlators/performance/open-behind/src/open-behind.c | 8 | ||||
-rw-r--r-- | xlators/performance/quick-read/src/quick-read.c | 8 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 8 | ||||
-rw-r--r-- | xlators/performance/readdir-ahead/src/readdir-ahead.c | 8 | ||||
-rw-r--r-- | xlators/performance/symlink-cache/src/symlink-cache.c | 8 | ||||
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 8 |
10 files changed, 80 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c index 61ad0e188d..2f656f748c 100644 --- a/xlators/features/shard/src/shard.c +++ b/xlators/features/shard/src/shard.c @@ -6821,6 +6821,14 @@ struct xlator_dumpops dumpops = { struct volume_options options[] = { { + .key = {"shard"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable shard", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, + { .key = {"shard-block-size"}, .type = GF_OPTION_TYPE_SIZET, .op_version = {GD_OP_VERSION_3_7_0}, diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 275c103978..28b59973c7 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -2126,6 +2126,14 @@ struct xlator_cbks cbks = { }; struct volume_options options[] = { + { + .key = {"io-cache"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable io-cache", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, {.key = {"priority"}, .type = GF_OPTION_TYPE_PRIORITY_LIST, .default_value = "", diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index c876afad8c..1f19d5b2c7 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -3760,6 +3760,14 @@ struct xlator_dumpops mdc_dumpops = { struct volume_options mdc_options[] = { { + .key = {"md-cache"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable md-cache", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, + { .key = {"cache-selinux"}, .type = GF_OPTION_TYPE_BOOL, .default_value = "false", diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c index 78c29031dd..6bbe63f7d9 100644 --- a/xlators/performance/nl-cache/src/nl-cache.c +++ b/xlators/performance/nl-cache/src/nl-cache.c @@ -779,6 +779,14 @@ struct xlator_dumpops nlc_dumpops = { struct volume_options nlc_options[] = { { + .key = {"nl-cache"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable nl-cache", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, + { .key = {"nl-cache-positive-entry"}, .type = GF_OPTION_TYPE_BOOL, .default_value = "false", diff --git a/xlators/performance/open-behind/src/open-behind.c b/xlators/performance/open-behind/src/open-behind.c index 590e0b0d99..a4302a776c 100644 --- a/xlators/performance/open-behind/src/open-behind.c +++ b/xlators/performance/open-behind/src/open-behind.c @@ -1306,6 +1306,14 @@ struct xlator_dumpops dumpops = { struct volume_options options[] = { { + .key = {"open-behind"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable open-behind", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, + { .key = {"use-anonymous-fd"}, .type = GF_OPTION_TYPE_BOOL, .default_value = "no", diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c index ee91aca40a..244e8c8d44 100644 --- a/xlators/performance/quick-read/src/quick-read.c +++ b/xlators/performance/quick-read/src/quick-read.c @@ -1581,6 +1581,14 @@ struct xlator_dumpops qr_dumpops = { }; struct volume_options qr_options[] = { + { + .key = {"quick-read"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable quick-read", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, {.key = {"priority"}, .type = GF_OPTION_TYPE_ANY}, {.key = {"cache-size"}, .type = GF_OPTION_TYPE_SIZET, diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 22a2ae29f5..224edf0864 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -1222,6 +1222,14 @@ struct xlator_dumpops dumpops = { }; struct volume_options options[] = { + { + .key = {"read-ahead"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable read-ahead", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, {.key = {"force-atime-update"}, .type = GF_OPTION_TYPE_BOOL, .op_version = {1}, diff --git a/xlators/performance/readdir-ahead/src/readdir-ahead.c b/xlators/performance/readdir-ahead/src/readdir-ahead.c index 3a030ecbdc..dee977c6e2 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, diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c index 58d0783f23..07c3623ee9 100644 --- a/xlators/performance/symlink-cache/src/symlink-cache.c +++ b/xlators/performance/symlink-cache/src/symlink-cache.c @@ -356,5 +356,13 @@ struct xlator_cbks cbks = { }; struct volume_options options[] = { + { + .key = {"symlink-cache"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable symlink-cache", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, {.key = {NULL}}, }; diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 65c72cfa89..018cd04dbc 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -3154,6 +3154,14 @@ struct xlator_dumpops dumpops = { }; struct volume_options options[] = { + { + .key = {"write-behind"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "off", + .description = "enable/disable write-behind", + .op_version = {GD_OP_VERSION_6_0}, + .flags = OPT_FLAG_SETTABLE, + }, {.key = {"flush-behind"}, .type = GF_OPTION_TYPE_BOOL, .default_value = "on", |