summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorShyamsundarR <srangana@redhat.com>2017-12-06 11:32:00 -0500
committerJeff Darcy <jeff@pl.atyp.us>2017-12-06 23:43:31 +0000
commitc502ca166473f4f0e027f3475924d8dc4e486bd3 (patch)
tree7abd0721535fd1ce9732f7382e78522cb6f6f10f /xlators/cluster/dht
parent820a91a219bbeb65f84d963db3fd79e261f194ad (diff)
dht/crypt/tier: Fix use of booleans as integers
BUG: 1520974 Change-Id: I19ea40c888e88a7a4ac271168ed1820c2075be93 Signed-off-by: ShyamsundarR <srangana@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
-rw-r--r--xlators/cluster/dht/src/tier-common.c20
2 files changed, 6 insertions, 16 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index d396c1d8173..3d6fbb1fd79 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -88,7 +88,7 @@ struct dht_layout {
int gen;
int type;
int ref; /* use with dht_conf_t->layout_lock */
- gf_boolean_t search_unhashed;
+ uint32_t search_unhashed;
struct {
int err; /* 0 = normal
-1 = dir exists and no xattr
diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c
index 2f30ef67fe4..c6b54d21d8e 100644
--- a/xlators/cluster/dht/src/tier-common.c
+++ b/xlators/cluster/dht/src/tier-common.c
@@ -1089,28 +1089,18 @@ tier_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
local->op_ret = 0;
- switch (local->quota_deem_statfs) {
- case _gf_true:
- if (event == _gf_true)
+ if (local->quota_deem_statfs) {
+ if (event == _gf_true) {
action = qdstatfs_action_COMPARE;
- else
+ } else {
action = qdstatfs_action_NEGLECT;
- break;
+ }
+ } else {
- case _gf_false:
if (event == _gf_true) {
action = qdstatfs_action_REPLACE;
local->quota_deem_statfs = _gf_true;
}
- break;
-
- default:
- gf_msg (this->name, GF_LOG_ERROR, 0,
- DHT_MSG_INVALID_VALUE,
- "Encountered third "
- "value for boolean variable %d",
- local->quota_deem_statfs);
- break;
}
if (local->quota_deem_statfs) {