From 7e3b038c6cea6a89feae684012fa6a33443c7473 Mon Sep 17 00:00:00 2001 From: Sachin Pandit Date: Thu, 15 May 2014 09:24:33 +0530 Subject: cli/snapshot : Dont Do the validation of snapshot config limit in CLI code path. Problem : If we try to set the volume snap limit to more that 256, it always shows value cannot exceed 256, irrespective of system max limit. Solution : Dont do validation in CLI side. Change-Id: I292c0bc91a1806cd4906fca0151dd98135e6e49a BUG: 1098122 Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/7777 Tested-by: Gluster Build System Reviewed-by: Raghavendra Bhat Reviewed-by: Rajesh Joseph Reviewed-by: Kaushal M --- cli/src/cli-cmd-parser.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 5e619f3cd17..7c6e3176dc6 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -3553,7 +3553,7 @@ cli_snap_config_limit_parse (const char **words, dict_t *dict, char *key) { int ret = -1; - unsigned int limit = 0; + int limit = 0; char *end_ptr = NULL; GF_ASSERT (words); @@ -3576,18 +3576,6 @@ cli_snap_config_limit_parse (const char **words, dict_t *dict, goto out; } - if (strcmp (key, "snap-max-hard-limit") == 0 && limit > 256) { - ret = -1; - cli_err ("%s value cannot be more than 256", key); - goto out; - } - - if (strcmp (key, "snap-max-soft-limit") == 0 && limit > 100) { - ret = -1; - cli_err ("%s value cannot be more than 100", key); - goto out; - } - ret = dict_set_int32 (dict, key, limit); if (ret) { gf_log ("cli", GF_LOG_ERROR, "Could not set " -- cgit