diff options
author | Varsha Rao <varao@redhat.com> | 2018-03-16 14:23:25 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-04-11 10:53:48 +0000 |
commit | 909e2cdf06fbd7b4161fff402fc6ef7b5e189c21 (patch) | |
tree | b2190d23646807254b149be54448f136dbd4e143 /xlators/performance/io-threads | |
parent | 0002c36666c9b043a330ee08533a87fe7fd16491 (diff) | |
download | glusterfs-909e2cdf06fbd7b4161fff402fc6ef7b5e189c21.tar.gz glusterfs-909e2cdf06fbd7b4161fff402fc6ef7b5e189c21.tar.xz glusterfs-909e2cdf06fbd7b4161fff402fc6ef7b5e189c21.zip |
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/io-threads')
-rw-r--r-- | xlators/performance/io-threads/src/io-threads.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index 7bdcc62465..4531137c93 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -1160,6 +1160,9 @@ reconfigure (xlator_t *this, dict_t *options) GF_OPTION_RECONF ("watchdog-secs", conf->watchdog_secs, options, int32, out); + GF_OPTION_RECONF ("pass-through", this->pass_through, options, bool, + out); + if (conf->watchdog_secs > 0) { start_iot_watchdog (this); } else { @@ -1243,6 +1246,8 @@ init (xlator_t *this) GF_OPTION_INIT ("cleanup-disconnected-reqs", conf->cleanup_disconnected_reqs, bool, out); + GF_OPTION_INIT ("pass-through", this->pass_through, bool, out); + conf->this = this; for (i = 0; i < GF_FOP_PRI_MAX; i++) { @@ -1527,6 +1532,14 @@ struct volume_options options[] = { .tags = {"io-threads"}, .description = "'Poison' queued requests when a client disconnects" }, + { .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 = {"io-threads"}, + .description = "Enable/Disable io threads translator" + }, { .key = {NULL}, }, }; |