From 8e0d48cbb23cf056277ebc609d47b5184b95fa87 Mon Sep 17 00:00:00 2001 From: "Anand V. Avati" Date: Mon, 13 Apr 2009 18:42:36 +0530 Subject: use ctx->page_size in all translators and transports instead of having their own configurations Signed-off-by: Anand V. Avati --- xlators/performance/io-cache/src/io-cache.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'xlators/performance/io-cache/src') 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")); -- cgit