summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2013-11-25 15:16:23 +0530
committerVijay Bellur <vbellur@redhat.com>2013-11-30 10:15:05 -0800
commit182bad8bfd099da5e742da28c4820936eb1f3867 (patch)
tree50cbf409e303d5bef128c5da08809aef75dc62b4 /libglusterfs
parent72f733a64abeffee23fb87a3cb397baea1dc22a4 (diff)
cli, glusterd: More quota fixes ...
... which may be grouped under the following categories: 1. Fix incorrect cli exit status for 'quota list' cmd 2. Print appropriate error message on quota parse errors in cli Authored by: Anuradha Talur <atalur@redhat.com> 3. glusterd: Improve quota validation during stage-op 4. Fix peer probe issues resulting from quota conf checksum mismatches 5. Enhancements to CLI output in the event of quota command failures Authored by: Kaushal Madappa <kmadappa@redhat.com> 7. Move aux mount location from /tmp to /var/run/gluster Authored by: Krishnan Parthasarathi <kparthas@redhat.com> 8. Fix performance issues in quota limit-usage Authored by: Krutika Dhananjay <kdhananj@redhat.com> Note: Some functions that were used in earlier version of quota, that aren't called anymore have been removed. Change-Id: I9d874f839ae5fdcfbe6d4f2d727eac091f27ac57 BUG: 969461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6366 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.c70
-rw-r--r--libglusterfs/src/common-utils.h3
2 files changed, 0 insertions, 73 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 08efb5c9f03..7862f6aa01b 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2994,76 +2994,6 @@ backtrace_symbols(void *const *trace, size_t len)
#undef BELOW
#endif /* __NetBSD__ */
-/* TODO: extract common code from gf_get_soft_limit and gf_get_hard_limit into a
- * function
- */
-int
-gf_get_soft_limit (char *limit, char **soft_limit)
-{
- int colon_count = 0;
- int i = 0;
- int len = 0;
- char *sl = NULL;
-
- len = strlen (limit);
- for (i = 0; i < len; i++) {
- if (limit[i] == ':')
- colon_count++;
- if (colon_count == 2)
- break;
- }
-
- if (colon_count != 2) {
- gf_log ("common-utils", GF_LOG_DEBUG, "Soft-limit absent");
- return 0;
- }
-
- sl = GF_CALLOC (len - i, sizeof (char), gf_common_mt_char);
- if (!sl)
- return -1;
- strncpy (sl, &limit[i+1], len - i - 1);
- *soft_limit = sl;
-
- return 1;
-}
-
-int
-gf_get_hard_limit (char *limit, char **hard_limit)
-{
- int i = 0;
- int hlbegin = 0;
- int len = 0;
- char *hl = NULL;
-
- len = strlen (limit);
-
- for (i = 0; i < len; i++) {
- if (limit[i] == ':')
- break;
- }
-
- if (i == len) {
- gf_log ("common-utils", GF_LOG_ERROR, "Hard limit not found");
- return -1;
- }
-
- hlbegin = i + 1;
- i++;
-
- while ((limit[i] != '\0') && (limit[i] != ':')) {
- i++;
- }
-
- hl = GF_CALLOC (i - hlbegin + 1, sizeof (char), gf_common_mt_char);
- if (!hl)
- return -1;
-
- strncpy (hl, &limit[hlbegin], i - hlbegin);
- *hard_limit = hl;
-
- return 0;
-}
-
int
gf_skip_header_section (int fd, int header_len)
{
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 500d34237f0..6f8436fcba0 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -615,9 +615,6 @@ size_t backtrace(void **, size_t);
char **backtrace_symbols(void *const *, size_t);
#endif
-int gf_get_soft_limit (char *limit, char **soft_limit);
-int gf_get_hard_limit (char *limit, char **hard_limit);
-
gf_boolean_t
gf_is_service_running (char *pidfile, int *pid);
int