summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-01-05 10:07:11 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-01-28 10:18:15 +0800
commit919df3bf721b62085419b9f305b4f6bcd06a3acb (patch)
treed4ee9da66a24039a7d0da3d8d89709cb1b3999fa
parent5176cb71001a32521313dff5294b3257f382bf67 (diff)
downloadceph-919df3bf721b62085419b9f305b4f6bcd06a3acb.tar.gz
mds: lock remote inode's primary dentry during rename
commit 1203cd2110 (mds: allow open_remote_ino() to open xlocked dentry) makes Server::handle_client_rename() xlocks remote inodes' primary dentry so witness MDS can open xlocked dentry. But I added remote inodes' projected primary dentries to the xlock list. This is wrong because projected dentries are invisible for path traverse. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r--src/mds/Server.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mds/Server.cc b/src/mds/Server.cc
index ebdbfe4b04e..eced76fe5f5 100644
--- a/src/mds/Server.cc
+++ b/src/mds/Server.cc
@@ -5351,9 +5351,9 @@ void Server::handle_client_rename(MDRequest *mdr)
// open_remote_ino() with 'want_locked=true' when the srcdn or destdn
// is traversed.
if (srcdnl->is_remote())
- xlocks.insert(&srci->get_projected_parent_dn()->lock);
+ xlocks.insert(&srci->get_parent_dn()->lock);
if (destdnl->is_remote())
- xlocks.insert(&oldin->get_projected_parent_dn()->lock);
+ xlocks.insert(&oldin->get_parent_dn()->lock);
}
// we need to update srci's ctime. xlock its least contended lock to do that...