summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-shared.c
diff options
context:
space:
mode:
authorSusant Palai <spalai@redhat.com>2016-04-18 17:42:06 +0530
committerNiels de Vos <ndevos@redhat.com>2016-05-01 18:05:03 -0700
commit3ff1861546e619bb3c9dc155c55df5d6ee1a479e (patch)
tree9499e68566de0fab5b66a5715cce3a702f351bd9 /xlators/cluster/dht/src/dht-shared.c
parent2f4733657b0a8439620b045fcb597838a818487a (diff)
glusterd: volume set changes for lock migration
Change-Id: I48c6f9cdda47503615ba65882acd5eedf0a70c89 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14024 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-shared.c')
-rw-r--r--xlators/cluster/dht/src/dht-shared.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/xlators/cluster/dht/src/dht-shared.c b/xlators/cluster/dht/src/dht-shared.c
index 856819ac052..0fea1d58e58 100644
--- a/xlators/cluster/dht/src/dht-shared.c
+++ b/xlators/cluster/dht/src/dht-shared.c
@@ -455,7 +455,13 @@ dht_reconfigure (xlator_t *this, dict_t *options)
GF_OPTION_RECONF ("rebal-throttle", conf->dthrottle, options,
str, out);
+ GF_OPTION_RECONF ("lock-migration", conf->lock_migration_enabled,
+ options, bool, out);
+
if (conf->defrag) {
+ conf->defrag->lock_migration_enabled =
+ conf->lock_migration_enabled;
+
GF_DECIDE_DEFRAG_THROTTLE_COUNT (throttle_count, conf);
gf_msg ("DHT", GF_LOG_INFO, 0,
DHT_MSG_REBAL_THROTTLE_INFO,
@@ -588,8 +594,6 @@ err:
return ret;
}
-
-
int
dht_init (xlator_t *this)
{
@@ -722,8 +726,14 @@ dht_init (xlator_t *this)
GF_OPTION_INIT ("readdir-optimize", conf->readdir_optimize, bool, err);
+
+ GF_OPTION_INIT ("lock-migration", conf->lock_migration_enabled,
+ bool, err);
+
if (defrag) {
- GF_OPTION_INIT ("rebalance-stats", defrag->stats, bool, err);
+ defrag->lock_migration_enabled = conf->lock_migration_enabled;
+
+ GF_OPTION_INIT ("rebalance-stats", defrag->stats, bool, err);
if (dict_get_str (this->options, "rebalance-filter", &temp_str)
== 0) {
if (gf_defrag_pattern_list_fill (this, defrag, temp_str)
@@ -1066,5 +1076,12 @@ struct volume_options options[] = {
"max of [($(processing units) - 4) / 2), 4]"
},
+ { .key = {"lock-migration"},
+ .type = GF_OPTION_TYPE_BOOL,
+ .default_value = "off",
+ .description = " If enabled this feature will migrate the posix locks"
+ " associated with a file during rebalance"
+ },
+
{ .key = {NULL} },
};