From 1a4a900589b35faec28f67c7c26004a240bf6a6c Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Fri, 13 Apr 2018 12:03:48 +0530 Subject: sdfs: enable by default also provide an option for pass-through to enable/disable xlator fixes: #421 Change-Id: Ie30a91ad09620db62ab07b797e23123fd1200d1f Signed-off-by: Amar Tumballi --- xlators/features/sdfs/src/sdfs.c | 25 +++++++++++++++++++++++++ xlators/mgmt/glusterd/src/glusterd-volume-set.c | 3 +-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/xlators/features/sdfs/src/sdfs.c b/xlators/features/sdfs/src/sdfs.c index 66ba874f64..8f46da3f74 100644 --- a/xlators/features/sdfs/src/sdfs.c +++ b/xlators/features/sdfs/src/sdfs.c @@ -1466,12 +1466,27 @@ init (xlator_t *this) goto out; } + GF_OPTION_INIT ("pass-through", this->pass_through, bool, out); + ret = 0; out: return ret; } +int +reconfigure (xlator_t *this, dict_t *options) +{ + int ret = -1; + + GF_OPTION_RECONF ("pass-through", this->pass_through, options, bool, + out); + + ret = 0; + out: + return ret; +} + int fini (xlator_t *this) { @@ -1496,3 +1511,13 @@ struct xlator_fops fops = { struct xlator_cbks cbks; +struct volume_options options[] = { + { .key = {"pass-through"}, + .type = GF_OPTION_TYPE_BOOL, + .default_value = "false", + .op_version = {GD_OP_VERSION_4_1_0}, + .flags = OPT_FLAG_SETTABLE | OPT_FLAG_DOC | OPT_FLAG_CLIENT_OPT, + .tags = {"sdfs"}, + .description = "Enable/Disable dentry serialize functionality" + }, +}; diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 4fbc45d7cb..8b2b1f8023 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -3799,11 +3799,10 @@ struct volopt_map_entry glusterd_volopt_map[] = { }, { .key = "features.sdfs", .voltype = "features/sdfs", - .value = "off", + .value = "on", .option = "!features", .op_version = GD_OP_VERSION_4_0_0, .description = "enable/disable dentry serialization xlator in volume", - .flags = VOLOPT_FLAG_CLIENT_OPT | VOLOPT_FLAG_XLATOR_OPT, .type = NO_DOC, }, { .key = "features.cloudsync", -- cgit