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>
This commit is contained in:
parent
f168db1da7
commit
40a9e53a44
@ -6820,6 +6820,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,
|
||||
|
@ -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 = "",
|
||||
|
@ -3759,6 +3759,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,
|
||||
|
@ -778,6 +778,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,
|
||||
|
@ -1305,6 +1305,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,
|
||||
|
@ -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,
|
||||
|
@ -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},
|
||||
|
@ -1229,6 +1229,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,
|
||||
|
@ -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}},
|
||||
};
|
||||
|
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user