summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2015-10-19 09:04:07 -0400
committerDan Lambright <dlambrig@redhat.com>2015-10-19 13:00:18 -0700
commit6fe5d09826542c37626f8f63299d6bce4671c34f (patch)
tree2052d52db07c9957f7446dbb4645072b48a0f78d /xlators
parent9a14852e95880b08f9209384032e7e5413b493b2 (diff)
cluster/tier remove suprious log messages on valid failed migration
Backport fix 12391 > On a write to a replica volume, we record in all brick's databases an entry. > When the tier daemon runs, it will only move the file if it is the true > owner of the file as defined by the XATTR_NODE_UUID_KEY. > Change-Id: Ib82717f87a3f94f3d0d9f969773de9e88d6aaf22 > BUG: 1273043 > Signed-off-by: Dan Lambright <dlambrig@redhat.com> > Reviewed-on: http://review.gluster.org/12391 > Reviewed-by: Joseph Fernandes > Tested-by: NetBSD Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Change-Id: I12147f878cd1927f845867fb7c0b84c4db017ee1 BUG: 1272398 Reviewed-on: http://review.gluster.org/12394 Reviewed-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/tier.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 397ac6b86ad..116888ead83 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -72,6 +72,11 @@ out:
return ret;
}
+/*
+ * return 0 if the same node.
+ * return 1 if not the same node, but no errors.
+ * return -1 if errors.xs
+ */
static int
tier_check_same_node (xlator_t *this, loc_t *loc, gf_defrag_info_t *defrag)
{
@@ -107,6 +112,7 @@ tier_check_same_node (xlator_t *this, loc_t *loc, gf_defrag_info_t *defrag)
if (gf_uuid_compare (node_uuid, defrag->node_uuid)) {
gf_msg (this->name, GF_LOG_INFO, 0, DHT_MSG_LOG_TIER_STATUS,
"%s does not belong to this node", loc->path);
+ ret = 1;
goto out;
}
@@ -476,7 +482,8 @@ tier_migrate_using_query_file (void *_args)
loc.name);
if (tier_check_same_node (this, &loc, defrag)) {
- per_link_status = -1;
+ if (ret < 0)
+ per_link_status = -1;
goto abort;
}