From e44d4e135747b04a5e2b7cfac21f9a3343e071db Mon Sep 17 00:00:00 2001 From: GauravKumarGarg Date: Wed, 12 Nov 2014 17:41:33 +0530 Subject: DHT: cluster.min-free-disk option should validate correctly PROBLEM: Previously gluster accepting input value as a percentage which is out of range [0-100] and accepting input value as a size (unit is byte) which is fractional for option cluster.min-free-disk. FIX: Now with this change it will refer to correct validation function and it will accept value that is in range [0-100] for input value as a percentage and unsigned integer value for input as a size (unit in byte) for option cluster.min-free-disk. Change-Id: Iee1962a100542e146276cfc8a4068abddee2bf2d BUG: 1163108 Signed-off-by: Gaurav Kumar Garg Reviewed-on: http://review.gluster.org/9104 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Raghavendra G Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libglusterfs/src/common-utils.h') diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index eaede81a5c8..69b1e277861 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -580,7 +580,7 @@ int gf_string2uint64_base10 (const char *str, uint64_t *n); int gf_string2bytesize (const char *str, uint64_t *n); int gf_string2bytesize_size (const char *str, size_t *n); int gf_string2bytesize_uint64 (const char *str, uint64_t *n); -int gf_string2percent_or_bytesize (const char *str, uint64_t *n, +int gf_string2percent_or_bytesize (const char *str, double *n, gf_boolean_t *is_percent); int gf_string2boolean (const char *str, gf_boolean_t *b); -- cgit