diff options
author | N Balachandran <nbalacha@redhat.com> | 2016-02-25 12:44:24 +0530 |
---|---|---|
committer | Dan Lambright <dlambrig@redhat.com> | 2016-02-27 10:48:12 -0800 |
commit | 1dce0ff0c34b86da04862b1efe0221960e6911a8 (patch) | |
tree | 18a0eecef1700b2c7ddb51c5804a951dd6f53f29 /xlators/cluster/dht/src | |
parent | e8121c4afb3680f532b450872b5a3ffcb3766a97 (diff) |
cluster/tier : Fixed wrong variable comparison
The wrong variable was being checked to determine
the watermark value.
> Change-Id: If4c97fa70b772187f1fcbdf5193e077cb356a8b1
> BUG: 1303895
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: http://review.gluster.org/13357
> Smoke: Gluster Build System <jenkins@build.gluster.com>
> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Change-Id: I0a98e0efbc093a727912107038477239e6d85765
BUG: 1306129
Reviewed-on: http://review.gluster.org/13516
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: mohammed rafi kc <rkavunga@redhat.com>
Tested-by: mohammed rafi kc <rkavunga@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/tier.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index 28f08fed332..e716dde35ab 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -335,6 +335,17 @@ exit: return ret; } + +static gf_boolean_t +is_hot_tier_full (gf_tier_conf_t *tier_conf) +{ + if (tier_conf && (tier_conf->mode == TIER_MODE_WM) && + (tier_conf->watermark_last == TIER_WM_HI)) + return _gf_true; + + return _gf_false; +} + int tier_do_migration (xlator_t *this, int promote, loc_t *root_loc) { @@ -447,6 +458,7 @@ tier_migrate_using_query_file (void *_args) int total_files = 0; loc_t root_loc = { 0 }; + GF_VALIDATE_OR_GOTO ("tier", query_cbk_args, out); GF_VALIDATE_OR_GOTO ("tier", query_cbk_args->this, out); this = query_cbk_args->this; @@ -519,7 +531,7 @@ tier_migrate_using_query_file (void *_args) * a chance to start if not already running*/ if (query_cbk_args->is_promotion && - defrag->tier_conf.mode == TIER_WM_HI) { + is_hot_tier_full (&defrag->tier_conf)) { gf_msg (this->name, GF_LOG_INFO, 0, DHT_MSG_LOG_TIER_STATUS, @@ -531,7 +543,6 @@ tier_migrate_using_query_file (void *_args) continue; } - if (!list_empty (&query_record->link_list)) { per_file_status = dict_set_str (migrate_data, @@ -1585,6 +1596,8 @@ tier_check_promote (gf_tier_conf_t *tier_conf, } + + void clear_bricklist (struct list_head *brick_list) { |