From b8a68ccf9478656dc90c724d6ec842cb488c95d7 Mon Sep 17 00:00:00 2001 From: sageweil Date: Wed, 22 Aug 2007 21:02:13 +0000 Subject: [PATCH] fixed link bug git-svn-id: https://ceph.svn.sf.net/svnroot/ceph@1658 29311d96-e01e-0410-9327-a35deaab8ce9 --- trunk/fusetrace/fusetrace_ll.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/trunk/fusetrace/fusetrace_ll.cc b/trunk/fusetrace/fusetrace_ll.cc index 361248a9cb9fd..b0b9517bd5cb2 100644 --- a/trunk/fusetrace/fusetrace_ll.cc +++ b/trunk/fusetrace/fusetrace_ll.cc @@ -619,7 +619,7 @@ static void ft_ll_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, lock.Lock(); make_ino_path(path, ino); newpin = inode_map[newparent]; - make_inode_path(path, newpin, newname); + make_inode_path(newpath, newpin, newname); lock.Unlock(); trace_lock.Lock(); @@ -629,10 +629,15 @@ static void ft_ll_link(fuse_req_t req, fuse_ino_t ino, fuse_ino_t newparent, << newname << endl; trace_lock.Unlock(); + cout << "link " << path << " newpath " << newpath << endl; int res = ::link(path.c_str(), newpath.c_str()); if (res == 0) { - fuse_reply_err(req, 0); + struct fuse_entry_param fe; + memset(&fe, 0, sizeof(fe)); + ::lstat(newpath.c_str(), &fe.attr); + fe.ino = fe.attr.st_ino; + fuse_reply_entry(req, &fe); } else fuse_reply_err(req, errno); } -- 2.39.5