]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client: fix Client::getcwd() 1385/head
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 6 Mar 2014 23:12:39 +0000 (07:12 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 7 Mar 2014 23:27:58 +0000 (07:27 +0800)
An recent commit made MDS not include dentry trace in LOOKUPPARENT
reply. It broke Client::getcwd. The fix is change getcwd() to use
LOOKUPNAME MDS request

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/client/Client.cc

index 699d369a5416798d28ae120af9c96c0be3176ed3..554732745b7ae173ad7ec5eafb59607075e1fe75 100644 (file)
@@ -6558,7 +6558,7 @@ void Client::getcwd(string& dir)
     if (!dn) {
       // look it up
       ldout(cct, 10) << "getcwd looking up parent for " << *in << dendl;
-      MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPPARENT);
+      MetaRequest *req = new MetaRequest(CEPH_MDS_OP_LOOKUPNAME);
       filepath path(in->ino);
       req->set_filepath(path);
       req->set_inode(in);