From 87b19927ed41cfe47579c1c069cb6640fd47a732 Mon Sep 17 00:00:00 2001 From: Dan Lambright Date: Tue, 9 Feb 2016 03:37:31 +0000 Subject: 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 Reviewed-on: http://review.gluster.org/13433 Smoke: Gluster Build System Reviewed-by: Joseph Fernandes NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/cluster/dht/src/tier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src/tier.h') 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, -- cgit