return open(relpath, flags, mode, 0, 0, 0, NULL);
}
-int Client::lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name)
+int Client::lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name,
+ const UserPerm& perms)
{
Mutex::Locker lock(client_lock);
ldout(cct, 3) << "lookup_hash enter(" << ino << ", #" << dirino << "/" << name << ") = " << dendl;
path2.push_dentry(string(f));
req->set_filepath2(path2);
- UserPerm perms(get_uid(), get_gid()); // FIXME
int r = make_request(req, perms, NULL, NULL,
rand() % mdsmap->get_num_in_mds());
ldout(cct, 3) << "lookup_hash exit(" << ino << ", #" << dirino << "/" << name << ") = " << r << dendl;
int mknod(const char *path, mode_t mode, dev_t rdev=0);
int open(const char *path, int flags, mode_t mode=0);
int open(const char *path, int flags, mode_t mode, int stripe_unit, int stripe_count, int object_size, const char *data_pool);
- int lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name);
+ int lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name,
+ const UserPerm& perms);
int lookup_ino(inodeno_t ino, Inode **inode=NULL);
int lookup_parent(Inode *in, Inode **parent=NULL);
int lookup_name(Inode *in, Inode *parent);
sscanf(diname.c_str(), "%llx", (long long unsigned*)&dirino.val);
string name = get_sarg(0);
if (run_me()) {
- lookup_hash(ino, dirino, name.c_str());
+ lookup_hash(ino, dirino, name.c_str(), perms);
}
}
break;
}
-int SyntheticClient::lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name)
+int SyntheticClient::lookup_hash(inodeno_t ino, inodeno_t dirino,
+ const char *name, const UserPerm& perms)
{
- int r = client->lookup_hash(ino, dirino, name);
+ int r = client->lookup_hash(ino, dirino, name, perms);
dout(0) << "lookup_hash(" << ino << ", #" << dirino << "/" << name << ") = " << r << dendl;
return r;
}
void import_find(const char *basedir, const char *find, bool writedata);
- int lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name);
+ int lookup_hash(inodeno_t ino, inodeno_t dirino, const char *name,
+ const UserPerm& perms);
int lookup_ino(inodeno_t ino);
int chunk_file(string &filename);