diff options
| author | Poornima G <pgurusid@redhat.com> | 2018-01-09 17:26:44 +0530 | 
|---|---|---|
| committer | Poornima G <pgurusid@redhat.com> | 2018-01-22 04:10:52 +0000 | 
| commit | 24bf7715140586675f8d2036f4d589bc255c16dc (patch) | |
| tree | 77c037c66bc14b40d79bed94770ec54303d2301b /libglusterfs/src/common-utils.c | |
| parent | 303cc2b54797bc5371be742543ccb289010c92f2 (diff) | |
md-cache: Implement dynamic configuration of xattr list for caching
Currently, the list of xattrs that md-cache can cache is hard coded
in the md-cache.c file, this necessiates code change and rebuild
everytime a new xattr needs to be added to md-cache xattr cache
list.
With this patch, the user will be able to configure a comma
seperated list of xattrs to be cached by md-cache
Updates #297
Change-Id: Ie35ed607d17182d53f6bb6e6c6563ac52bc3132e
Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.c')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 17 | 
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 4eed92a92f9..ac0325f9d60 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -2069,6 +2069,23 @@ skipwhite (char **s)                  (*s)++;  } +void +gf_strTrim (char **s) +{ +        char *end = NULL; + +        end = *s + strlen(*s) - 1; +        while (end > *s && isspace ((unsigned char)*end)) +                end--; + +        *(end+1) = '\0'; + +        while (isspace (**s)) +                (*s)++; + +        return; +} +  char *  nwstrtail (char *str, char *pattern)  {  | 
