summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libglusterfs/src/options.c23
-rw-r--r--xlators/performance/io-cache/src/io-cache.c3
-rw-r--r--xlators/performance/quick-read/src/quick-read.c3
3 files changed, 11 insertions, 18 deletions
diff --git a/libglusterfs/src/options.c b/libglusterfs/src/options.c
index a28f3b7ea4f..3b1e21b5d0f 100644
--- a/libglusterfs/src/options.c
+++ b/libglusterfs/src/options.c
@@ -152,22 +152,13 @@ xlator_option_validate_sizet (xlator_t *xl, const char *key, const char *value,
}
if ((size < opt->min) || (size > opt->max)) {
- if ((strncmp (key, "cache-size", 10) == 0) &&
- (size > opt->max)) {
- snprintf (errstr, 256, "Cache size %" GF_PRI_SIZET " is out of "
- "range [%.0f - %.0f]",
- size, opt->min, opt->max);
- gf_msg (xl->name, GF_LOG_WARNING, 0,
- LG_MSG_OUT_OF_RANGE, "%s", errstr);
- } else {
- snprintf (errstr, 256,
- "'%" GF_PRI_SIZET "' in 'option %s %s' "
- "is out of range [%.0f - %.0f]",
- size, key, value, opt->min, opt->max);
- gf_msg (xl->name, GF_LOG_ERROR, 0,
- LG_MSG_OUT_OF_RANGE, "%s", errstr);
- ret = -1;
- }
+ snprintf (errstr, 256,
+ "'%" GF_PRI_SIZET "' in 'option %s %s' "
+ "is out of range [%.0f - %.0f]",
+ size, key, value, opt->min, opt->max);
+ gf_msg (xl->name, GF_LOG_ERROR, 0,
+ LG_MSG_OUT_OF_RANGE, "%s", errstr);
+ ret = -1;
}
out:
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index df247c2318a..74ddf8e36a1 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -8,6 +8,7 @@
cases as published by the Free Software Foundation.
*/
+#include <math.h>
#include "glusterfs.h"
#include "logging.h"
#include "dict.h"
@@ -2155,7 +2156,7 @@ struct volume_options options[] = {
{ .key = {"cache-size"},
.type = GF_OPTION_TYPE_SIZET,
.min = 4 * GF_UNIT_MB,
- .max = 32 * GF_UNIT_GB,
+ .max = INFINITY,
.default_value = "32MB",
.description = "Size of the read cache."
},
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index 4e9c6dcf091..8edf495fcdd 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -8,6 +8,7 @@
cases as published by the Free Software Foundation.
*/
+#include <math.h>
#include "quick-read.h"
#include "statedump.h"
#include "quick-read-messages.h"
@@ -1144,7 +1145,7 @@ struct volume_options options[] = {
{ .key = {"cache-size"},
.type = GF_OPTION_TYPE_SIZET,
.min = 0,
- .max = 32 * GF_UNIT_GB,
+ .max = INFINITY,
.default_value = "128MB",
.description = "Size of the read cache."
},