// ===============================================================
// high level (POSIXy) interface
-int Client::_do_lookup(Inode *dir, const char *name, Inode **target)
+int Client::_do_lookup(Inode *dir, const string& name, Inode **target)
{
int op = dir->snapid == CEPH_SNAPDIR ? CEPH_MDS_OP_LOOKUPSNAP : CEPH_MDS_OP_LOOKUP;
MetaRequest *req = new MetaRequest(op);
req->set_filepath(path);
req->inode = dir;
req->head.args.getattr.mask = 0;
- ldout(cct, 10) << "_lookup on " << path << dendl;
+ ldout(cct, 10) << "_do_lookup on " << path << dendl;
int r = make_request(req, 0, 0, target);
- ldout(cct, 10) << "_lookup res is " << r << dendl;
+ ldout(cct, 10) << "_do_lookup res is " << r << dendl;
return r;
}
}
}
- r = _do_lookup(dir, dname.c_str(), target);
+ r = _do_lookup(dir, dname, target);
done:
if (r < 0)
// internal interface
// call these with client_lock held!
- int _do_lookup(Inode *dir, const char *name, Inode **target);
+ int _do_lookup(Inode *dir, const string& name, Inode **target);
int _lookup(Inode *dir, const string& dname, Inode **target);
int _link(Inode *in, Inode *dir, const char *name, int uid=-1, int gid=-1, Inode **inp = 0);