diff options
author | Joseph Fernandes <josferna@redhat.com> | 2015-04-16 12:30:16 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-05-07 08:32:08 -0700 |
commit | 2eaea122a52b844b2c610ece96e7a33341ca7c5d (patch) | |
tree | 6c7613705bdb9c9cacbde22bc435cfe622d9b776 /xlators/cluster/dht/src/dht-rebalance.c | |
parent | 42a508fb008c4d2d90faf30616423cfbcba84a30 (diff) |
dht/rebalancer: Marking tiering migration fops
This is a follow up patch for http://review.gluster.org/#/c/10080
In the above, the suggested change in
http://review.gluster.org/#/c/10080/7/xlators/cluster/dht/src/dht-rebalance.c
doesnot work. The reason it doesnt work is promotion and demotion are done in
a multithread way. Whenever a promotion or demotion thread is called, the frame
of the old sync_op thread is not carried with it. As a result the frame->root->pid
is not set.
Solution:
When the file is getting migrated, we get a tiering.migration key_value in the
xattr dict, so that we pass this dic key-value when we do syncop_setxattr()
to do data migration and set the frame->root->pid GF_CLIENT_PID_TIER_DEFRAG
in dht_setxattr() just before calling dht_start_rebalance_task().
> http://review.gluster.org/#/c/10266/
> Change-Id: I86fef2d961b32fdd2c0c69d8512cbe846b393404
> BUG: 1194753
> Signed-off-by: Joseph Fernandes <josferna@redhat.com>
> Reviewed-on: http://review.gluster.org/10266
> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
> Reviewed-by: Susant Palai <spalai@redhat.com>
> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Change-Id: I6ab42b2c7a3c3e21c461d097b7558ee967b62c62
BUG: 1218959
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10266
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Susant Palai <spalai@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/10601
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src/dht-rebalance.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 5e9f4d6e1a6..11b63c8ee01 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -2711,12 +2711,7 @@ gf_defrag_start (void *data) if (!frame) goto out; - /* 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; + frame->root->pid = GF_CLIENT_PID_DEFRAG; defrag->pid = frame->root->pid; |