summaryrefslogtreecommitdiffstats
path: root/xlators
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
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')
-rw-r--r--xlators/features/shard/src/shard.c8
-rw-r--r--xlators/performance/io-cache/src/io-cache.c8
-rw-r--r--xlators/performance/md-cache/src/md-cache.c8
-rw-r--r--xlators/performance/nl-cache/src/nl-cache.c8
-rw-r--r--xlators/performance/open-behind/src/open-behind.c8
-rw-r--r--xlators/performance/quick-read/src/quick-read.c8
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c8
-rw-r--r--xlators/performance/readdir-ahead/src/readdir-ahead.c8
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache.c8
-rw-r--r--xlators/performance/write-behind/src/write-behind.c8
10 files changed, 80 insertions, 0 deletions
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index 61ad0e188d1..2f656f748c0 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 275c1039789..28b59973c7e 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 c876afad8c3..1f19d5b2c79 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 78c29031ddb..6bbe63f7d96 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 590e0b0d996..a4302a776c5 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 ee91aca40a6..244e8c8d44e 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 22a2ae29f50..224edf0864a 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 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,
diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c
index 58d0783f233..07c3623ee94 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 65c72cfa894..018cd04dbc6 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",