summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.h3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c2
7 files changed, 11 insertions, 10 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index d5e521d90bb..de1c33df5bf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -240,7 +240,7 @@ glusterd_op_stage_set_ganesha (dict_t *dict, char **op_errstr)
int ret = -1;
char *volname = NULL;
int exists = 0;
- gf_boolean_t value = _gf_false;
+ int value = -1;
gf_boolean_t option = _gf_false;
char *str = NULL;
int dict_count = 0;
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index c86587f6fbf..4a81ce25085 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -856,7 +856,7 @@ __glusterd_handle_cluster_lock (rpcsvc_request_t *req)
int32_t ret = -1;
gd1_mgmt_cluster_lock_req lock_req = {{0},};
glusterd_op_lock_ctx_t *ctx = NULL;
- glusterd_op_t op = GD_OP_EVENT_LOCK;
+ glusterd_op_sm_event_type_t op = GD_OP_EVENT_LOCK;
glusterd_op_info_t txn_op_info = {{0},};
glusterd_conf_t *priv = NULL;
uuid_t *txn_id = NULL;
@@ -947,9 +947,9 @@ glusterd_handle_cluster_lock (rpcsvc_request_t *req)
__glusterd_handle_cluster_lock);
}
-int
+static int
glusterd_req_ctx_create (rpcsvc_request_t *rpc_req,
- glusterd_op_t op, uuid_t uuid,
+ int op, uuid_t uuid,
char *buf_val, size_t buf_len,
gf_gld_mem_types_t mem_type,
glusterd_req_ctx_t **req_ctx_out)
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 076ae8ef56b..ea1400d7637 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -145,7 +145,7 @@ glusterd_txn_opinfo_dict_fini ()
void
glusterd_txn_opinfo_init (glusterd_op_info_t *opinfo,
- glusterd_op_sm_state_info_t *state, glusterd_op_t *op,
+ glusterd_op_sm_state_info_t *state, int *op,
dict_t *op_ctx, rpcsvc_request_t *req)
{
glusterd_conf_t *conf = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
index 454181d188f..19b1bd97e04 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
@@ -91,7 +91,8 @@ struct glusterd_op_info_ {
int32_t pending_count;
int32_t brick_pending_count;
int32_t op_count;
- glusterd_op_t op;
+ /* op is an enum, glusterd_op_t or glusterd_op_sm_state_info_t */
+ int op;
struct cds_list_head op_peers;
void *op_ctx;
rpcsvc_request_t *req;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index cb1c8e951e5..e2b0ea21501 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1196,7 +1196,7 @@ snap_max_hard_limits_validate (dict_t *dict, char *volname,
max_limit = opt_hard_max;
}
- if ((value < 0) || (value > max_limit)) {
+ if (value > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid snap-max-hard-limit "
"%"PRIu64 ". Expected range 1 - %"PRIu64,
@@ -1289,7 +1289,7 @@ glusterd_snapshot_config_prevalidate (dict_t *dict, char **op_errstr,
if (soft_limit) {
max_limit = GLUSTERD_SNAPS_MAX_SOFT_LIMIT_PERCENT;
- if ((soft_limit < 0) || (soft_limit > max_limit)) {
+ if (soft_limit > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid "
"snap-max-soft-limit ""%"
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index a0b856160c9..ac4870d516c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -1720,7 +1720,7 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
int op_ret = -1;
dict_t *req_dict = NULL;
glusterd_conf_t *conf = NULL;
- glusterd_op_t op = 0;
+ glusterd_op_t op = GD_OP_NONE;
int32_t tmp_op = 0;
char *op_errstr = NULL;
char *tmp = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 3df4b3556cf..c808b07cbf2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3906,7 +3906,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *tmp = NULL;
gf_boolean_t var = _gf_false;
gf_boolean_t ob = _gf_false;
- gf_boolean_t uss_enabled = _gf_false;
+ int uss_enabled = -1;
xlator_t *this = THIS;
GF_ASSERT (this);