summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2014-10-17 11:46:46 +0530
committerVijay Bellur <vbellur@redhat.com>2014-10-20 22:55:03 -0700
commiteea806646216f5e5a91fd35a4e138e193e3b6fac (patch)
tree3fe8865afbb8b4834d34ad5ec0e8ecc232499c52 /xlators/performance/io-threads
parent5ac067e560696410c059b21ca039f74687c62e7a (diff)
performance/io-threads: Fix static analysis error
stub->fop can be more than FOP_MAX is what static analysis is complaining. This patch doesn't allow any 'log' to be printed in the case fop value is not in the definied range. It gives EINVAL instead. Change-Id: I293381e2c1ad0ab45154b0192a637612becaf744 BUG: 1153935 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/8939 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/performance/io-threads')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c
index 8201a95a4d0..9c6ae5af12e 100644
--- a/xlators/performance/io-threads/src/io-threads.c
+++ b/xlators/performance/io-threads/src/io-threads.c
@@ -336,15 +336,13 @@ iot_schedule (call_frame_t *frame, xlator_t *this, call_stub_t *stub)
pri = IOT_PRI_LO;
break;
- case GF_FOP_NULL:
case GF_FOP_FORGET:
case GF_FOP_RELEASE:
case GF_FOP_RELEASEDIR:
case GF_FOP_GETSPEC:
- case GF_FOP_MAXVALUE:
- //fail compilation on missing fop
- //new fop must choose priority.
break;
+ default:
+ return -EINVAL;
}
out:
gf_log (this->name, GF_LOG_DEBUG, "%s scheduled as %s fop",