summaryrefslogtreecommitdiffstats
path: root/xlators/performance/read-ahead/src
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/read-ahead/src
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/read-ahead/src')
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 39475d2c966..6d015f70ba3 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,