summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c10
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c9
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c8
5 files changed, 20 insertions, 15 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index ed8fae1dc4b..7db62e98b16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1636,7 +1636,8 @@ glusterd_op_stage_status_volume (dict_t *dict, char **op_errstr)
}
} else if ((cmd & GF_CLI_STATUS_SHD) != 0) {
if (glusterd_is_shd_compatible_volume (volinfo)) {
- shd_enabled = is_self_heal_enabled (volinfo, vol_opts);
+ shd_enabled = gd_is_self_heal_enabled (volinfo,
+ vol_opts);
} else {
ret = -1;
snprintf (msg, sizeof (msg),
@@ -3272,7 +3273,8 @@ glusterd_op_status_volume (dict_t *dict, char **op_errstr,
}
if (glusterd_is_shd_compatible_volume (volinfo))
- shd_enabled = is_self_heal_enabled (volinfo, vol_opts);
+ shd_enabled = gd_is_self_heal_enabled
+ (volinfo, vol_opts);
if (shd_enabled) {
ret = glusterd_add_node_to_dict
(priv->shd_svc.name, rsp_dict,
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index e42f119099b..ff56c9f3f39 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -6369,7 +6369,7 @@ out:
}
static inline int
-is_replica_volume (int type)
+glusterd_is_replica_volume (int type)
{
if (type == GF_CLUSTER_TYPE_REPLICATE ||
type == GF_CLUSTER_TYPE_STRIPE_REPLICATE)
@@ -6381,11 +6381,13 @@ glusterd_is_volume_replicate (glusterd_volinfo_t *volinfo)
{
gf_boolean_t replicates = _gf_false;
if (volinfo->type == GF_CLUSTER_TYPE_TIER) {
- replicates = is_replica_volume (volinfo->tier_info.cold_type) |
- is_replica_volume (volinfo->tier_info.hot_type);
+ replicates = glusterd_is_replica_volume
+ (volinfo->tier_info.cold_type) |
+ glusterd_is_replica_volume
+ (volinfo->tier_info.hot_type);
return replicates;
}
- return is_replica_volume ((volinfo->type));
+ return glusterd_is_replica_volume ((volinfo->type));
}
gf_boolean_t
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index e837b2fc83a..6c32c9bd980 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4277,8 +4277,8 @@ volgen_graph_set_iam_shd (volgen_graph_t *graph)
}
static int
-prepare_shd_volume_options_for_tier (glusterd_volinfo_t *volinfo,
- dict_t *set_dict)
+glusterd_prepare_shd_volume_options_for_tier (glusterd_volinfo_t *volinfo,
+ dict_t *set_dict)
{
int ret = -1;
char *key = NULL;
@@ -4308,7 +4308,8 @@ prepare_shd_volume_options (glusterd_volinfo_t *volinfo,
int ret = 0;
if (volinfo->type == GF_CLUSTER_TYPE_TIER) {
- ret = prepare_shd_volume_options_for_tier (volinfo, set_dict);
+ ret = glusterd_prepare_shd_volume_options_for_tier (volinfo,
+ set_dict);
if (ret)
goto out;
} else {
@@ -4433,7 +4434,7 @@ out:
}
gf_boolean_t
-is_self_heal_enabled (glusterd_volinfo_t *volinfo, dict_t *dict)
+gd_is_self_heal_enabled (glusterd_volinfo_t *volinfo, dict_t *dict)
{
char *shd_key = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h
index f5f922475f0..36a50919d3c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.h
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h
@@ -286,6 +286,6 @@ int
glusterd_volopt_validate (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
char *value, char **op_errstr);
gf_boolean_t
-is_self_heal_enabled (glusterd_volinfo_t *volinfo, dict_t *dict);
+gd_is_self_heal_enabled (glusterd_volinfo_t *volinfo, dict_t *dict);
#endif
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index a20036af89f..75f11e742b6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -676,7 +676,7 @@ glusterd_handle_cli_delete_volume (rpcsvc_request_t *req)
__glusterd_handle_cli_delete_volume);
}
static char*
-_get_shd_key (int type)
+gd_get_shd_key (int type)
{
char *key = NULL;
@@ -703,7 +703,7 @@ glusterd_handle_shd_option_for_tier (glusterd_volinfo_t *volinfo,
char *key = NULL;
int ret = 0;
- key = _get_shd_key (volinfo->tier_info.cold_type);
+ key = gd_get_shd_key (volinfo->tier_info.cold_type);
if (key) {
count++;
snprintf (dict_key, sizeof (dict_key), "key%d", count);
@@ -716,7 +716,7 @@ glusterd_handle_shd_option_for_tier (glusterd_volinfo_t *volinfo,
goto out;
}
- key = _get_shd_key (volinfo->tier_info.hot_type);
+ key = gd_get_shd_key (volinfo->tier_info.hot_type);
if (key) {
count++;
snprintf (dict_key, sizeof (dict_key), "key%d", count);
@@ -1890,7 +1890,7 @@ glusterd_op_stage_heal_volume (dict_t *dict, char **op_errstr)
ret = 0;
goto out;
}
- enabled = is_self_heal_enabled (volinfo, opt_dict);
+ enabled = gd_is_self_heal_enabled (volinfo, opt_dict);
if (!enabled) {
ret = -1;
snprintf (msg, sizeof (msg), "Self-heal-daemon is "