From 40a9e53a44e887658fade3f03afc018e82b941b9 Mon Sep 17 00:00:00 2001 From: Aravinda VK Date: Thu, 6 Dec 2018 15:09:26 +0530 Subject: 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 --- xlators/performance/nl-cache/src/nl-cache.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/performance/nl-cache/src/nl-cache.c') 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 @@ -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, -- cgit