summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/tier.c
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2015-05-11 14:43:23 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-06-10 01:08:47 -0700
commitf6a062044a3447bea5bf0fcf21a3f85c00fb6c7d (patch)
tree3d45bbfccdca4e9189131b2609730a5b628029ee /xlators/cluster/dht/src/tier.c
parentd835219a30327ede60e4ef28210914ab30bd0712 (diff)
tier/volume set: Validate volume set option for tier
Volume set option related to tier volume can only be set for tier volume, also currently all volume set i for tier option accepts a non-negative integer. This patch validate both condition. Change-Id: I3611af048ff4ab193544058cace8db205ea92336 BUG: 1216960 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/10751 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Joseph Fernandes
Diffstat (limited to 'xlators/cluster/dht/src/tier.c')
-rw-r--r--xlators/cluster/dht/src/tier.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 0c8daf64087..2279e060442 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -827,6 +827,12 @@ tier_start (xlator_t *this, gf_defrag_info_t *defrag)
}
tick = (tick + 1) % TIMER_SECS;
+
+ if (freq_promote != defrag->tier_promote_frequency)
+ next_promote = tick;
+ if (freq_demote != defrag->tier_demote_frequency)
+ next_demote = tick;
+
if ((next_demote != tick) && (next_promote != tick))
continue;