From c7b518ab85f6fbcbdbae64c8fa092e998a14d1e9 Mon Sep 17 00:00:00 2001 From: Kaushik BV Date: Thu, 7 Oct 2010 06:37:12 +0000 Subject: mgmt/Glusterd: Volume set enhancements - performance.flush-behind, transport.keepalive added - volume info to display the options reconfigured Signed-off-by: Kaushik BV Signed-off-by: Vijay Bellur BUG: 1159 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159 --- .../performance/write-behind/src/write-behind.c | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'xlators/performance/write-behind/src/write-behind.c') diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index ef596dfbe..8a4be0f7f 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -2751,7 +2751,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) goto out; } - if (window_size < (524288)) { + if (window_size < (512 * GF_UNIT_KB)) { gf_log(this->name, GF_LOG_WARNING, "Validation" "'option cache-size %s' failed , Min value" "should be 512KiB ", str); @@ -2760,7 +2760,7 @@ validate_options (xlator_t *this, dict_t *options, char **op_errstr) goto out; } - if (window_size > (1073741824)) { + if (window_size > (1 * GF_UNIT_GB)) { gf_log(this->name, GF_LOG_WARNING, "Reconfiguration" "'option cache-size %s' failed , Max value" "can be 1 GiB", str); @@ -2840,6 +2840,27 @@ reconfigure (xlator_t *this, dict_t *options) } else conf->window_size = WB_WINDOW_SIZE; + + ret = dict_get_str (options, "flush-behind", + &str); + if (ret == 0) { + ret = gf_string2boolean (str, + &conf->flush_behind); + if (ret == -1) { + gf_log (this->name, GF_LOG_ERROR, + "'flush-behind' takes only boolean arguments"); + conf->flush_behind = 1; + return -1; + } + if (conf->flush_behind) { + gf_log (this->name, GF_LOG_DEBUG, + "enabling flush-behind"); + } + else + gf_log (this->name, GF_LOG_DEBUG, + "disabling flush-behind"); + } + out: return 0; -- cgit