summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/tier.h
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2016-02-09 03:37:31 +0000
committerDan Lambright <dlambrig@redhat.com>2016-02-28 17:32:22 -0800
commit87b19927ed41cfe47579c1c069cb6640fd47a732 (patch)
treeae1e4918e815ee746b58e38e565807f38e398c62 /xlators/cluster/dht/src/tier.h
parent368e26f454fe35477e46dc698fa6b8c3c608ea8d (diff)
cluster/tier: make promotion and demotion independant
Currently a main loop in tiering spawns promotion and demotion threads, and does a join to wait for them to complete. When one of the two threads takes a long time, the main thread waits for it before exiting the join. It may wait so long the scheduled time for the other thread is skipped. In the case of demotion, it may be a long time before another attempt. This patch fixes that by making the promotion and demotion activities independant. A side effect of this change is the logic is significantly simplified. Change-Id: I1196bd4bbfc95e8aa326a9bd4ebf395032369d1c BUG: 1306852 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/13433 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes 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/tier.h')
-rw-r--r--xlators/cluster/dht/src/tier.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h
index 41c5a318de4..0807608fda2 100644
--- a/xlators/cluster/dht/src/tier.h
+++ b/xlators/cluster/dht/src/tier.h
@@ -81,7 +81,8 @@ typedef struct _dm_thread_args {
struct list_head *brick_list;
int freq_time;
int return_value;
-} promotion_args_t, demotion_args_t;
+ int is_promotion;
+} migration_args_t;
typedef enum tier_watermark_op_ {
TIER_WM_NONE = 0,