From 664daecef49d5e497bb5dd867fc1f51b046d4bf2 Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Tue, 17 Apr 2012 00:19:54 +0200 Subject: 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 Reviewed-on: http://review.gluster.com/3170 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Anand Avati --- xlators/performance/io-threads/src/io-threads.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/performance/io-threads/src/io-threads.c') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index d316a19a4..66864fcd4 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -202,7 +202,7 @@ iot_schedule (call_frame_t *frame, xlator_t *this, call_stub_t *stub) int ret = -1; iot_pri_t pri = IOT_PRI_MAX - 1; - if (frame->root->pid < 0) { + if (frame->root->pid < GF_CLIENT_PID_MAX) { pri = IOT_PRI_LEAST; goto out; } -- cgit