diff options
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 20 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 28 | ||||
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 18 |
3 files changed, 3 insertions, 63 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 9d6f35806..0c394b84e 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1327,7 +1327,6 @@ init (xlator_t *this) ioc_table_t *table; dict_t *options = this->options; uint32_t index = 0; - char *page_size_string = NULL; char *cache_size_string = NULL; if (!this->children || this->children->next) { @@ -1346,26 +1345,9 @@ init (xlator_t *this) ERR_ABORT (table); table->xl = this; - table->page_size = IOC_PAGE_SIZE; + table->page_size = this->ctx->page_size; table->cache_size = IOC_CACHE_SIZE; - if (dict_get (options, "page-size")) - page_size_string = data_to_str (dict_get (options, - "page-size")); - - if (page_size_string) { - if (gf_string2bytesize (page_size_string, - &table->page_size) != 0) { - gf_log ("io-cache", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option page-size\"", - page_size_string); - return -1; - } - gf_log (this->name, GF_LOG_DEBUG, - "using page-size %"PRIu64"", table->page_size); - } - if (dict_get (options, "cache-size")) cache_size_string = data_to_str (dict_get (options, "cache-size")); diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 39475d2c9..6d015f70b 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -768,7 +768,6 @@ init (xlator_t *this) { ra_conf_t *conf; dict_t *options = this->options; - char *page_size_string = NULL; char *page_count_string = NULL; if (!this->children || this->children->next) { @@ -784,27 +783,9 @@ init (xlator_t *this) conf = (void *) CALLOC (1, sizeof (*conf)); ERR_ABORT (conf); - conf->page_size = 256 * 1024; - conf->page_count = 2; + conf->page_size = this->ctx->page_size; + conf->page_count = 4; - if (dict_get (options, "page-size")) - page_size_string = data_to_str (dict_get (options, - "page-size")); - if (page_size_string) - { - if (gf_string2bytesize (page_size_string, &conf->page_size) != 0) - { - gf_log ("read-ahead", - GF_LOG_ERROR, - "invalid number format \"%s\" of \"option page-size\"", - page_size_string); - return -1; - } - - gf_log (this->name, GF_LOG_DEBUG, "Using conf->page_size = %"PRIu64"", - conf->page_size); - } - if (dict_get (options, "page-count")) page_count_string = data_to_str (dict_get (options, "page-count")); @@ -878,11 +859,6 @@ struct volume_options options[] = { { .key = {"force-atime-update"}, .type = GF_OPTION_TYPE_BOOL }, - { .key = {"page-size"}, - .type = GF_OPTION_TYPE_SIZET, - .min = 64 * GF_UNIT_KB, - .max = 2 * GF_UNIT_MB - }, { .key = {"page-count"}, .type = GF_OPTION_TYPE_INT, .min = 1, diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 3aa14bd61..cba3c7e5f 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1807,7 +1807,6 @@ init (xlator_t *this) { dict_t *options = NULL; wb_conf_t *conf = NULL; - char *aggregate_size_string = NULL; char *window_size_string = NULL; char *flush_behind_string = NULL; char *disable_till_string = NULL; @@ -1846,18 +1845,6 @@ init (xlator_t *this) /* configure 'options aggregate-size <size>' */ conf->aggregate_size = 0; - ret = dict_get_str (options, "block-size", - &aggregate_size_string); - if (ret == 0) { - ret = gf_string2bytesize (aggregate_size_string, - &conf->aggregate_size); - if (ret != 0) { - gf_log (this->name, GF_LOG_ERROR, - "invalid number format \"%s\" of \"option aggregate-size\"", - aggregate_size_string); - return -1; - } - } gf_log (this->name, GF_LOG_DEBUG, "using aggregate-size = %"PRIu64"", @@ -1970,11 +1957,6 @@ struct volume_options options[] = { { .key = {"flush-behind"}, .type = GF_OPTION_TYPE_BOOL }, - { .key = {"block-size", "aggregate-size"}, - .type = GF_OPTION_TYPE_SIZET, - .min = 128 * GF_UNIT_KB, - .max = 4 * GF_UNIT_MB - }, { .key = {"cache-size", "window-size"}, .type = GF_OPTION_TYPE_SIZET, .min = 512 * GF_UNIT_KB, |