diff options
| author | Kaushik BV <kaushikbv@gluster.com> | 2010-10-07 06:37:12 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-07 05:43:35 -0700 | 
| commit | c7b518ab85f6fbcbdbae64c8fa092e998a14d1e9 (patch) | |
| tree | 4f55db97bf6e843c96637264c8d97219a5b0aa38 /xlators/performance/write-behind/src/write-behind.c | |
| parent | f62484f42230db9d240c9b0eaadac48d845053b1 (diff) | |
mgmt/Glusterd: Volume set enhancements
- performance.flush-behind, transport.keepalive added
- volume info to display the options reconfigured
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1159 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1159
Diffstat (limited to 'xlators/performance/write-behind/src/write-behind.c')
| -rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 25 | 
1 files changed, 23 insertions, 2 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index ef596dfbeaa..8a4be0f7f99 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;  | 
