summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-03-09 10:05:48 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-09 22:38:22 -0800
commit17111383828b44bf8f437aef76870c2c01fdd946 (patch)
tree7cdd31d78ea50b652a62a4cbb08d0ab646ea29cd
parent5b290bc6e3df76bea04c11cb15643173c33455bd (diff)
cluster/dht: Replace ftruncate call with truncate in rebalance
ftruncate call seems to be broken as of now (marker). Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: Ib49ced0471e1b8e9ee411eb5a9ff1b83c4d82bec BUG: 801658 Reviewed-on: http://review.gluster.com/2905 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 4c5dd6e99c5..0df20131a02 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -720,7 +720,8 @@ 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 */
- ret = syncop_ftruncate (to, dst_fd, 0);
+ /* TODO: revert back to syncop_ftruncate once its fixed */
+ ret = syncop_truncate (to, loc, 0);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
"%s: failed to reset target size back to 0 (%s)",
@@ -825,7 +826,8 @@ 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 */
- ret = syncop_ftruncate (from, src_fd, 0);
+ /* TODO: revert back to syncop_ftruncate once its fixed */
+ ret = syncop_truncate (from, loc, 0);
if (ret) {
gf_log (this->name, GF_LOG_WARNING,
"%s: failed to perform truncate on %s (%s)",