diff options
author | N Balachandran <nbalacha@redhat.com> | 2017-01-23 22:19:01 +0530 |
---|---|---|
committer | Shyamsundar Ranganathan <srangana@redhat.com> | 2017-02-07 08:32:32 -0500 |
commit | b1d35c6fbaf5e0e958c69ec9c99a5d87649e52bb (patch) | |
tree | 4211f03c180b6a31ed66fe4d2cc8c81b6e9d3e02 /xlators | |
parent | 7633e44854001ba9378320501b99dbe027dcc63c (diff) |
cluster/dht: Don't update layout in rebalance_task_completion
Updating the layout in the dht inode_ctx in
rebalance_task_completion after the file is migrated
is erroneous in case of files with hardlinks.
This step can be skipped as the layout will be set
in the syncop_lookup call post the migration in
dht_migrate_file.
> Change-Id: I24ac798a919585d91a117d6a207e6a31b88486c6
> BUG: 1415761
> Signed-off-by: N Balachandran <nbalacha@redhat.com>
> Reviewed-on: https://review.gluster.org/16457
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
> Reviewed-by: Susant Palai <spalai@redhat.com>
(cherry picked from commit ddf05f3d1e39cc920251c809e9ba42fe42b2c5f2)
Signed-off-by: N Balachandran <nbalacha@redhat.com>
Change-Id: I46176f8605cfb782aa17c2bc9ffd7a5f0d07dd88
BUG: 1419855
Reviewed-on: https://review.gluster.org/16554
Tested-by: N Balachandran <nbalacha@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 437ab2567ac..41a50cff3cc 100644 --- a/xlators/cluster/dht/src/dht-rebalance.c +++ b/xlators/cluster/dht/src/dht-rebalance.c @@ -1921,32 +1921,8 @@ rebalance_task (void *data) static int rebalance_task_completion (int op_ret, call_frame_t *sync_frame, void *data) { - int ret = -1; - uint64_t layout_int = 0; - dht_layout_t *layout = 0; - xlator_t *this = NULL; - dht_local_t *local = NULL; int32_t op_errno = EINVAL; - this = THIS; - local = sync_frame->local; - - if (!op_ret) { - /* Make sure we have valid 'layout' in inode ctx - after the operation */ - ret = inode_ctx_del (local->loc.inode, this, &layout_int); - if (!ret && layout_int) { - layout = (dht_layout_t *)(long)layout_int; - dht_layout_unref (this, layout); - } - - ret = dht_layout_preset (this, local->rebalance.target_node, - local->loc.inode); - if (ret) - gf_log (this->name, GF_LOG_WARNING, - "%s: failed to set inode ctx", local->loc.path); - } - if (op_ret == -1) { /* Failure of migration process, mostly due to write process. as we can't preserve the exact errno, lets say there was |