diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2013-11-25 15:16:23 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2013-12-03 01:48:31 -0800 | 
| commit | 8ed37473b124c97363b3f7eaf9824070559b4ec2 (patch) | |
| tree | d76924c04414be97a7cc7ba2f13570a080010dee /libglusterfs | |
| parent | 53d440b7e4a05d3ae7d3793e8c21d0eb4f50653d (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: I963d4145f3ecdfe30c61bfa8920baccb33d2d4bd
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/6386
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.c | 70 | ||||
| -rw-r--r-- | libglusterfs/src/common-utils.h | 3 | 
2 files changed, 0 insertions, 73 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 08efb5c9f..7862f6aa0 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 500d34237..6f8436fcb 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  | 
