From e0fa0bb1b1e1758d2e68b4940939e87d438fa14f Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Tue, 27 Aug 2013 13:02:00 +0530 Subject: gsyncd / geo-rep: fix hardlink creation on slave Change-Id: I20fbd518bf519cbf2362b97aeb8be7c3b105087a BUG: 1003805 Signed-off-by: Venky Shankar Reviewed-by: Amar Tumballi Tested-by: Amar Tumballi Reviewed-on: http://review.gluster.org/5757 Tested-by: Gluster Build System Reviewed-by: Avra Sengupta Tested-by: Avra Sengupta Reviewed-by: Anand Avati --- geo-replication/syncdaemon/resource.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index c3d31b78..c7755a41 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -514,11 +514,12 @@ class Server(object): elif op == 'MKDIR': blob = entry_pack_mkdir(gfid, bname, e['stat']) elif op == 'LINK': - st = lstat(entry) + slink = os.path.join(pfx, gfid) + st = lstat(slink) if isinstance(st, int): blob = entry_pack_reg(gfid, bname, e['stat']) else: - errno_wrap(os.link, [os.path.join(pfx, gfid), entry], [ENOENT, EEXIST]) + errno_wrap(os.link, [slink, entry], [ENOENT, EEXIST]) elif op == 'SYMLINK': blob = entry_pack_symlink(gfid, bname, e['link'], e['stat']) elif op == 'RENAME': -- cgit