From ffbe47e0ec8411313b666a8705f31a67d3862763 Mon Sep 17 00:00:00 2001 From: vmallika Date: Wed, 15 Apr 2015 17:35:07 +0530 Subject: quota: support for inode quota in quota.conf Currently when quota limit is set, corresponding gfid is set in quota.conf. This patch supports storing inode-quota limits in quota.conf and also stores additional byte for each gfid to differentiate between usage quota limit and inode quota limit. Change-Id: I444d7399407594edd280e640681679a784d4c46a BUG: 1218170 Signed-off-by: vmallika Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/10069 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur Signed-off-by: Sachin Pandit Reviewed-on: http://review.gluster.org/10524 --- cli/src/cli-cmd-parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cli/src/cli-cmd-parser.c') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 4fd205ed5fe..7d7eee5af6f 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -1045,7 +1045,8 @@ cli_cmd_quota_parse (const char **words, int wordcount, dict_t **options) } else { errno = 0; limit = strtol (words[5], &end_ptr, 10); - if (errno == ERANGE || errno == EINVAL || limit <= 0) { + if (errno == ERANGE || errno == EINVAL || limit <= 0 + || strcmp (end_ptr, "") != 0) { ret = -1; cli_err ("Please enter an interger value in " "the range 1 - %"PRId64, INT64_MAX); -- cgit