summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-04-16 13:31:59 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-16 11:19:18 -0700
commit369873fbeac1c33bf5f2468e475c3a08608e8965 (patch)
tree7b4e837bf4cd2b6ace82aafa0faf81a8629411e6 /xlators/cluster/dht
parentc6e226751efb4ce98e5c887b955c778b713b77bc (diff)
cluster/dht: Revert to calling ftruncate
Additionally, change lookup failure error to DEBUG level. Change-Id: I6eaf8e92a9cd34eba125a1e0e183bc3b6dc71945 BUG: 812769 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3155 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/cluster/dht')
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 819ec1dae..4c2b4a035 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -720,8 +720,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
gf_log (this->name, GF_LOG_ERROR, "%s: failed to migrate data",
loc->path);
/* reset the destination back to 0 */
- /* TODO: revert back to syncop_ftruncate once its fixed */
- ret = syncop_truncate (to, loc, 0);
+ ret = syncop_ftruncate (to, dst_fd, 0);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"%s: failed to reset target size back to 0 (%s)",
@@ -830,8 +829,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
/* Free up the data blocks on the source node, as the whole
file is migrated */
- /* TODO: revert back to syncop_ftruncate once its fixed */
- ret = syncop_truncate (from, loc, 0);
+ ret = syncop_ftruncate (from, src_fd, 0);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"%s: failed to perform truncate on %s (%s)",
@@ -848,7 +846,7 @@ dht_migrate_file (xlator_t *this, loc_t *loc, xlator_t *from, xlator_t *to,
ret = syncop_lookup (this, loc, NULL, NULL, NULL, NULL);
if (ret) {
- gf_log (this->name, GF_LOG_WARNING,
+ gf_log (this->name, GF_LOG_DEBUG,
"%s: failed to lookup the file on subvolumes (%s)",
loc->path, strerror (errno));
}