From 097795df7ebab48515d75e95a2c29e5ab42ac5ee Mon Sep 17 00:00:00 2001 From: Joseph Fernandes Date: Wed, 1 Apr 2015 02:56:23 +0530 Subject: ctr : Fix for heating of files during promotion/demotion This fix will solve the heating of the files during the promotion or demotion. Promotion: ~~~~~~~~~ When a file gets promoted it get the current time stamp during creation only, but following writes or reads during the migration wont heat the file. Demotion: ~~~~~~~~ When a file gets demoted it get the wind/unwind time stamp is set to zero. The following writes or reads during the migration wont heat the file. What is remaining ? ~~~~~~~~~~~~~~~~~ Bug 1209129 ( https://bugzilla.redhat.com/show_bug.cgi?id=1209129 ) Inspite of this fix there is still a issue remaining, i.e the heat of the file is not keep intact during a internal rebalance activity i.e a rebalance within a tier. Change-Id: I01e82dc226355599732d40e699062cee7960b0a5 BUG: 1207867 Signed-off-by: Joseph Fernandes Signed-off-by: Dan Lambright Signed-off-by: Joseph Fernandes Reviewed-on: http://review.gluster.org/10080 Reviewed-by: Shyamsundar Ranganathan Tested-by: Gluster Build System --- xlators/cluster/dht/src/dht-rebalance.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xlators/cluster/dht/src') diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index a0837e38528..1aa68fb9f62 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2039,7 +2039,12 @@ gf_defrag_start (void *data) if (!frame) goto out; - frame->root->pid = GF_CLIENT_PID_DEFRAG; + /* If its a tiering rebalancer mark it seperately so that CTR Xlator + * can take appropriate action */ + if (defrag->cmd == GF_DEFRAG_CMD_START_TIER) + frame->root->pid = GF_CLIENT_PID_TIER_DEFRAG; + else + frame->root->pid = GF_CLIENT_PID_DEFRAG; defrag->pid = frame->root->pid; -- cgit