summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src/dht-rename.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-05-27 00:35:54 +0000
committerAnand Avati <avati@gluster.com>2011-05-31 09:13:02 -0700
commit8e8ca7b9cd7c19e07655097e44665d9fa6c9ccb4 (patch)
treeba65ff22f2b290fef2fb815111e70ff747650e63 /xlators/cluster/dht/src/dht-rename.c
parentf8cc3a6a9f3979ed7cad3882e43b0fec219850a2 (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) {