summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-01-23 22:19:01 +0530
committerNiels de Vos <ndevos@redhat.com>2017-02-13 03:32:11 -0500
commit301f1a2f7762ee40dedf5a09a394f1f5670f6d60 (patch)
treeb9b1fd5c0dd7e889b2d680de1768e12430bf6ef9
parent7c242cacf578c18b1c9131771567a17e18b4b369 (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 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Reviewed-by: Susant Palai <spalai@redhat.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: Ifccffd67b8bc12208efb23101366a1ac7a8c60f5 BUG: 1420184 Reviewed-on: https://review.gluster.org/16561 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Susant Palai <spalai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c24
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 127996e..a478f06 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1835,32 +1835,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