summaryrefslogtreecommitdiffstats
path: root/xlators/performance/nl-cache
diff options
context:
space:
mode:
authorVarsha Rao <varao@redhat.com>2018-03-16 14:23:25 +0530
committerAmar Tumballi <amarts@redhat.com>2018-04-11 10:53:48 +0000
commit909e2cdf06fbd7b4161fff402fc6ef7b5e189c21 (patch)
treeb2190d23646807254b149be54448f136dbd4e143 /xlators/performance/nl-cache
parent0002c36666c9b043a330ee08533a87fe7fd16491 (diff)
xlators/performance: Add pass-through option
Add pass-through option in performance traslators. Set the option in GF_OPTION_INIT() and GF_OPTION_RECONF() Updates: #304 Change-Id: If1537450147d154905831e36f7162a32866d7ad6 Signed-off-by: Varsha Rao <varao@redhat.com>
Diffstat (limited to 'xlators/performance/nl-cache')
-rw-r--r--xlators/performance/nl-cache/src/nl-cache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/xlators/performance/nl-cache/src/nl-cache.c b/xlators/performance/nl-cache/src/nl-cache.c
index 7dd8467b54d..0f0e53bac2b 100644
--- a/xlators/performance/nl-cache/src/nl-cache.c
+++ b/xlators/performance/nl-cache/src/nl-cache.c
@@ -720,6 +720,8 @@ nlc_reconfigure (xlator_t *this, dict_t *options)
options, bool, out);
GF_OPTION_RECONF ("nl-cache-limit", conf->cache_size, options,
size_uint64, out);
+ GF_OPTION_RECONF ("pass-through", this->pass_through, options, bool,
+ out);
out:
return 0;
@@ -741,6 +743,7 @@ nlc_init (xlator_t *this)
GF_OPTION_INIT ("nl-cache-positive-entry", conf->positive_entry_cache,
bool, out);
GF_OPTION_INIT ("nl-cache-limit", conf->cache_size, size_uint64, out);
+ GF_OPTION_INIT ("pass-through", this->pass_through, bool, out);
/* Since the positive entries are stored as list of refs on
* existing inodes, we should not overflow the inode lru_limit.
@@ -841,6 +844,15 @@ struct volume_options nlc_options[] = {
.flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC,
.description = "Time period after which cache has to be refreshed",
},
+ { .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 = {"nl-cache"},
+ .description = "Enable/Disable nl cache translator"
+ },
+
{ .key = {NULL} },
};