diff options
| author | Sachin Pandit <spandit@redhat.com> | 2014-05-15 09:24:33 +0530 | 
|---|---|---|
| committer | Kaushal M <kaushal@redhat.com> | 2014-06-04 23:30:18 -0700 | 
| commit | 7e3b038c6cea6a89feae684012fa6a33443c7473 (patch) | |
| tree | d7ccc121ad5a346a36090bb578692f76876ec77a /cli/src | |
| parent | 9f90cbee7da450271873340c0b13059064c41af1 (diff) | |
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 <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/7777
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli/src')
| -rw-r--r-- | cli/src/cli-cmd-parser.c | 14 | 
1 files changed, 1 insertions, 13 deletions
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 "  | 
