summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rename.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-05-27 00:41:55 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 09:10:43 -0700
commit753f17aca63057e4c4a70c1f3cbf7729f890cb69 (patch)
tree85d095a1b8bdd77e2be593ea8753f7f8158cec49 /xlators/cluster/dht/src/dht-rename.c
parentc5a7947e6a7422360816e45fc3c12cf9c0152802 (diff)
dht-rename: Unlink older link files before creating new one
If a older link file exists, unlink it and then create the linkfile. This will prevent mis-match of gfid's. Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2464 ([7b07d444a77526f27f860210930bf1d4c7fbea9b]: rm -rf gives Invalid argumenrt error) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2464
Diffstat (limited to 'xlators/cluster/dht/src/dht-rename.c')
-rw-r--r--xlators/cluster/dht/src/dht-rename.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index f6ed8769d8d..cef4a7b6fbc 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -593,8 +593,8 @@ dht_rename_create_links (call_frame_t *frame)
"linkfile %s @ %s => %s",
local->loc.path, dst_hashed->name, src_cached->name);
memcpy (local->gfid, local->loc.inode->gfid, 16);
- dht_linkfile_create (frame, dht_rename_links_cbk,
- src_cached, dst_hashed, &local->loc);
+ dht_linkfile_recreate (frame, dht_rename_links_cbk,
+ src_cached, dst_hashed, &local->loc);
}
if (src_cached != dst_hashed) {