|
|
21ab4e |
From 10301574b24614369d6b6844664d7729680fbf32 Mon Sep 17 00:00:00 2001
|
|
|
21ab4e |
From: N Balachandran <nbalacha@redhat.com>
|
|
|
21ab4e |
Date: Mon, 23 Jan 2017 22:19:01 +0530
|
|
|
21ab4e |
Subject: [PATCH 325/361] cluster/dht: Don't update layout in
|
|
|
21ab4e |
rebalance_task_completion
|
|
|
21ab4e |
|
|
|
21ab4e |
Updating the layout in the dht inode_ctx in
|
|
|
21ab4e |
rebalance_task_completion after the file is migrated
|
|
|
21ab4e |
is erroneous in case of files with hardlinks.
|
|
|
21ab4e |
This step can be skipped as the layout will be set
|
|
|
21ab4e |
in the syncop_lookup call post the migration in
|
|
|
21ab4e |
dht_migrate_file.
|
|
|
21ab4e |
|
|
|
21ab4e |
mainline:
|
|
|
21ab4e |
> BUG: 1415761
|
|
|
21ab4e |
> Reviewed-on: https://review.gluster.org/16457
|
|
|
21ab4e |
> Smoke: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
|
|
|
21ab4e |
> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
21ab4e |
> Reviewed-by: Susant Palai <spalai@redhat.com>
|
|
|
21ab4e |
(cherry picked from commit ee00e667a27b742751c863787b9c9fe78c892e7d)
|
|
|
21ab4e |
|
|
|
21ab4e |
BUG: 1409474
|
|
|
21ab4e |
Change-Id: I24ac798a919585d91a117d6a207e6a31b88486c6
|
|
|
21ab4e |
Signed-off-by: N Balachandran <nbalacha@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/101306
|
|
|
21ab4e |
Tested-by: Milind Changire <mchangir@redhat.com>
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
21ab4e |
---
|
|
|
21ab4e |
xlators/cluster/dht/src/dht-rebalance.c | 24 ------------------------
|
|
|
21ab4e |
1 file changed, 24 deletions(-)
|
|
|
21ab4e |
|
|
|
21ab4e |
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
21ab4e |
index 76778de..7c1a1d2 100644
|
|
|
21ab4e |
--- a/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
21ab4e |
+++ b/xlators/cluster/dht/src/dht-rebalance.c
|
|
|
21ab4e |
@@ -1922,32 +1922,8 @@ rebalance_task (void *data)
|
|
|
21ab4e |
static int
|
|
|
21ab4e |
rebalance_task_completion (int op_ret, call_frame_t *sync_frame, void *data)
|
|
|
21ab4e |
{
|
|
|
21ab4e |
- int ret = -1;
|
|
|
21ab4e |
- uint64_t layout_int = 0;
|
|
|
21ab4e |
- dht_layout_t *layout = 0;
|
|
|
21ab4e |
- xlator_t *this = NULL;
|
|
|
21ab4e |
- dht_local_t *local = NULL;
|
|
|
21ab4e |
int32_t op_errno = EINVAL;
|
|
|
21ab4e |
|
|
|
21ab4e |
- this = THIS;
|
|
|
21ab4e |
- local = sync_frame->local;
|
|
|
21ab4e |
-
|
|
|
21ab4e |
- if (!op_ret) {
|
|
|
21ab4e |
- /* Make sure we have valid 'layout' in inode ctx
|
|
|
21ab4e |
- after the operation */
|
|
|
21ab4e |
- ret = inode_ctx_del (local->loc.inode, this, &layout_int);
|
|
|
21ab4e |
- if (!ret && layout_int) {
|
|
|
21ab4e |
- layout = (dht_layout_t *)(long)layout_int;
|
|
|
21ab4e |
- dht_layout_unref (this, layout);
|
|
|
21ab4e |
- }
|
|
|
21ab4e |
-
|
|
|
21ab4e |
- ret = dht_layout_preset (this, local->rebalance.target_node,
|
|
|
21ab4e |
- local->loc.inode);
|
|
|
21ab4e |
- if (ret)
|
|
|
21ab4e |
- gf_log (this->name, GF_LOG_WARNING,
|
|
|
21ab4e |
- "%s: failed to set inode ctx", local->loc.path);
|
|
|
21ab4e |
- }
|
|
|
21ab4e |
-
|
|
|
21ab4e |
if (op_ret == -1) {
|
|
|
21ab4e |
/* Failure of migration process, mostly due to write process.
|
|
|
21ab4e |
as we can't preserve the exact errno, lets say there was
|
|
|
21ab4e |
--
|
|
|
21ab4e |
1.8.3.1
|
|
|
21ab4e |
|