diff options
author | Csaba Henk <csaba@redhat.com> | 2012-04-17 00:19:54 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-04-23 14:50:55 -0700 |
commit | 664daecef49d5e497bb5dd867fc1f51b046d4bf2 (patch) | |
tree | 5a5b1aa5684981f82f3c582267d9c2eefb9148df /libglusterfs/src/common-utils.h | |
parent | 6fbf369d59cf87b903403699666d99232a372fef (diff) |
clean up handling of special client pids
- no need to name a lower boundary [drop GF_CLIENT_PID_MIN]
- drop utility function to decide about pid speciality [gf_pid_client_check()];
when we implement uniform policy for special pids, use just comparison with
GF_CLIENT_PID_MAX (currently such uniform policy exists in io-threads, where
special clients get lowest priority)
- io-threads: drop numeric literal, use GF_CLIENT_PID_MAX
- xattr flipping (in fuse):
- fuse_xattr_alloc_default() made static
- avoid compiler warnings wrt. partial enum traversal in the switch
by not casting the original numeric value to gf_client_pid_t (enum) type
- trim down the switch to those cases with which there is something to do
[GF_CLIENT_PID_GSYNCD, GF_CLIENT_PID_HADOOP]
- eliminate the (theoretical) chance of succesfully returning
from fuse_flip_xattr_ns() with unallocated nkey
[as was the case with pids GF_CLIENT_PID_{MIN,MAX,DEFRAG}]
Change-Id: Ic2b83b908d8e3be23a7fba1e5895869828a6194b
BUG: 765433
Signed-off-by: Csaba Henk <csaba@redhat.com>
Reviewed-on: http://review.gluster.com/3170
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r-- | libglusterfs/src/common-utils.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h index 7e6da9ed2d4..c15abdbaa7d 100644 --- a/libglusterfs/src/common-utils.h +++ b/libglusterfs/src/common-utils.h @@ -105,7 +105,6 @@ enum _gf_client_pid GF_CLIENT_PID_GSYNCD = -1, GF_CLIENT_PID_HADOOP = -2, GF_CLIENT_PID_DEFRAG = -3, - GF_CLIENT_PID_MIN = -4 }; typedef enum _gf_boolean gf_boolean_t; @@ -493,6 +492,5 @@ char *get_host_name (char *word, char **host); char *get_path_name (char *word, char **path); void gf_path_strip_trailing_slashes (char *path); uint64_t get_mem_size (); -int gf_client_pid_check (gf_client_pid_t npid); int gf_strip_whitespace (char *str, int len); #endif /* _COMMON_UTILS_H */ |