summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/options.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/options.c')
-rw-r--r--libglusterfs/src/options.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/libglusterfs/src/options.c b/libglusterfs/src/options.c
index b64b24e0489..1e6413cc0a9 100644
--- a/libglusterfs/src/options.c
+++ b/libglusterfs/src/options.c
@@ -131,12 +131,22 @@ xlator_option_validate_sizet (xlator_t *xl, const char *key, const char *value,
}
if ((size < opt->min) || (size > opt->max)) {
- snprintf (errstr, 256,
- "'%"PRId64"' in 'option %s %s' is out of range "
- "[%"PRId64" - %"PRId64"]",
- size, key, value, opt->min, opt->max);
- gf_log (xl->name, GF_LOG_ERROR, "%s", errstr);
- goto out;
+ if (strncmp (key, "cache-size", 10) == 0) {
+ snprintf (errstr, 256, "Cache size %"PRId64" is out of "
+ "range [%"PRId64" - %"PRId64"]",
+ size, opt->min, opt->max);
+ //*op_errstr = gf_strdup (errstr);
+ gf_log (xl->name, GF_LOG_WARNING, "%s", errstr);
+ ret = 0;
+ goto out;
+ } else {
+ snprintf (errstr, 256,
+ "'%"PRId64"' in 'option %s %s' "
+ "is out of range [%"PRId64" - %"PRId64"]",
+ size, key, value, opt->min, opt->max);
+ gf_log (xl->name, GF_LOG_ERROR, "%s", errstr);
+ goto out;
+ }
}
ret = 0;