summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-10-02 13:49:21 +0530
committerVijay Bellur <vijay@gluster.com>2011-10-10 03:57:55 -0700
commit2ca4dbc9ce8b00e81a05b66f0020403025548888 (patch)
tree121b17e5db9c429d9f2d3bf738c23532e7b9d3ca
parentddff07073760baa11f8aeb5732c422b93efa1daf (diff)
glusterd rebalance: remove stale temporary file if migration fails
Change-Id: Ie13b0f2748b15c0359b7868460d4bc65ec05a217 BUG: 3576 Reviewed-on: http://review.gluster.com/552 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-rebalance.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
index 0c39d3ed0..ac1e3d4c9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c
+++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c
@@ -197,6 +197,7 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
full_path, strerror (errno));
close (dst_fd);
close (src_fd);
+ unlink (tmp_filename);
continue;
}
@@ -221,6 +222,7 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
full_path, strerror (errno));
close (dst_fd);
close (src_fd);
+ unlink (tmp_filename);
continue;
}
@@ -231,6 +233,7 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
tmp_filename, strerror (errno));
close (dst_fd);
close (src_fd);
+ unlink (tmp_filename);
continue;
}
@@ -242,6 +245,7 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
full_path);
close (dst_fd);
close (src_fd);
+ unlink (tmp_filename);
continue;
}
@@ -251,6 +255,7 @@ gf_glusterd_rebalance_move_data (glusterd_volinfo_t *volinfo, const char *dir)
full_path);
close (dst_fd);
close (src_fd);
+ unlink (tmp_filename);
continue;
}