summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorAnand V. Avati <avati@amp.gluster.com>2009-04-13 18:42:36 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-04-13 20:10:49 +0530
commit8e0d48cbb23cf056277ebc609d47b5184b95fa87 (patch)
treef2df0436810688bfbf532dbd046ec7b994de40d8 /xlators/performance/io-cache
parent451620e0ec88f717e7046ebb27fe1f29d73796d9 (diff)
use ctx->page_size in all translators and transports instead of having their own configurations
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 9d6f358062f..0c394b84ea2 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"));