summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/tier.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster/dht/src/tier.c')
-rw-r--r--xlators/cluster/dht/src/tier.c28
1 files changed, 13 insertions, 15 deletions
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index a6199173688..aa968b6f352 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -253,7 +253,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR,
"failed parsing %s\n", link_str);
per_link_status = -1;
- goto error;
+ goto abort;
}
gf_uuid_copy (p_loc.gfid, link_info->pargfid);
@@ -264,7 +264,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR,
"failed parsing %s\n", link_str);
per_link_status = -1;
- goto error;
+ goto abort;
}
ret = syncop_lookup (this, &p_loc, &par_stbuf, NULL,
@@ -274,7 +274,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR,
" ERROR in parent lookup\n");
per_link_status = -1;
- goto error;
+ goto abort;
}
linked_inode = inode_link (p_loc.inode, NULL, NULL,
&par_stbuf);
@@ -292,7 +292,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR, "ERROR in "
"memory allocation\n");
per_link_status = -1;
- goto error;
+ goto abort;
}
loc.path = gf_strdup (link_info->file_path);
@@ -301,7 +301,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR, "ERROR in "
"memory allocation\n");
per_link_status = -1;
- goto error;
+ goto abort;
}
gf_uuid_copy (loc.parent->gfid, link_info->pargfid);
@@ -313,7 +313,7 @@ tier_migrate_using_query_file (void *_args)
DHT_MSG_LOG_TIER_ERROR, "ERROR in "
"current lookup\n");
per_link_status = -1;
- goto error;
+ goto abort;
}
linked_inode = inode_link (loc.inode, NULL, NULL,
&current);
@@ -322,20 +322,19 @@ tier_migrate_using_query_file (void *_args)
/*
* Do not promote/demote if file already is where it
- * should be. This shall become a skipped count.
+ * should be. It means another brick moved the file
+ * so is not an error.
*/
src_subvol = dht_subvol_get_cached(this, loc.inode);
if (query_cbk_args->is_promotion &&
src_subvol == conf->subvolumes[1]) {
- per_link_status = -1;
- goto error;
+ goto abort;
}
if (!query_cbk_args->is_promotion &&
src_subvol == conf->subvolumes[0]) {
- per_link_status = -1;
- goto error;
+ goto abort;
}
gf_msg (this->name, GF_LOG_INFO, 0,
@@ -347,7 +346,7 @@ tier_migrate_using_query_file (void *_args)
if (tier_check_same_node (this, &loc, defrag)) {
per_link_status = -1;
- goto error;
+ goto abort;
}
gf_uuid_copy (loc.gfid, loc.inode->gfid);
@@ -361,15 +360,14 @@ tier_migrate_using_query_file (void *_args)
loc.name,
loc.path);
per_link_status = -1;
- goto error;
+ goto abort;
}
if (query_cbk_args->is_promotion)
defrag->total_files_promoted++;
else
defrag->total_files_demoted++;
-
-error:
+abort:
loc_wipe(&loc);
loc_wipe(&p_loc);