summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2017-10-09 17:46:16 +0530
committerRavishankar N <ravishankar@redhat.com>2017-10-09 17:51:08 +0530
commit47604fad4c2a3951077e41e0c007ceb979bb2c24 (patch)
tree4cf022745c771a8e01abeed7ec704c8a68529103 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent5f4aa8c21d10b25aa1322a96d3bca3c7499075eb (diff)
glusterd: fix client io-threads option for replicate volumes
Backport of https://review.gluster.org/#/c/18430/ Problem: Commit ff075a3d6f9b142911d25c27fd209838782bfff0 disabled loading client-io-threads for replicate volumes (it was set to on by default in commit e068c1997314046658dd502e9118dab32decf879) due to performance issues but in doing so, inadvertently failed to load the xlator even if the user explicitly enabled the option using the volume set command. This was despite returning returning sucess for the volume set. Fix: Modify the check in perfxl_option_handler() and add checks in volume create/add-brick/remove-brick code paths, tying it all to GD_OP_VERSION_3_12_2. Change-Id: Ib612973a999a7da818cc926f5c2601b1f0794fcf BUG: 1499158 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index ac59e4d75d1..e38f96313ed 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -12613,8 +12613,7 @@ out:
int
glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts,
char *input_key, char *orig_key,
- glusterd_volinfo_t *volinfo,
- char **op_errstr)
+ dict_t *vol_dict, char **op_errstr)
{
struct volopt_map_entry *vme = NULL;
int ret = -1;
@@ -12625,7 +12624,6 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts,
char dict_key[50] = {0,};
gf_boolean_t key_found = _gf_false;
glusterd_conf_t *priv = NULL;
- dict_t *vol_dict = NULL;
this = THIS;
GF_ASSERT (this);
@@ -12633,7 +12631,6 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts,
priv = this->private;
GF_VALIDATE_OR_GOTO (this->name, priv, out);
- vol_dict = volinfo->dict;
GF_VALIDATE_OR_GOTO (this->name, vol_dict, out);
/* Check whether key is passed for a single option */
@@ -12655,20 +12652,6 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts,
if (!def_val) {
ret = dict_get_str (vol_dict, vme->key, &def_val);
if (!def_val) {
- /* For replicate volumes
- * performance.client-io-threads will be set to
- * off by default until explicitly turned on
- */
- if (!strcmp (vme->key,
- "performance.client-io-threads")) {
- if (volinfo->type ==
- GF_CLUSTER_TYPE_REPLICATE ||
- volinfo->type ==
- GF_CLUSTER_TYPE_STRIPE_REPLICATE) {
- def_val = "off";
- goto set_count;
- }
- }
if (vme->value) {
def_val = vme->value;
} else {
@@ -12681,7 +12664,6 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts,
}
}
}
-set_count:
count++;
sprintf (dict_key, "key%d", count);
ret = dict_set_str(ctx, dict_key, vme->key);