-CInode* Server::rdlock_path_pin_ref(MDRequest *mdr, bool want_auth)
+CInode* Server::rdlock_path_pin_ref(MDRequest *mdr, bool want_auth, bool rdlock_dft)
{
dout(10) << "rdlock_path_pin_ref " << *mdr << dendl;
for (int i=0; i<(int)trace.size(); i++)
rdlocks.insert(&trace[i]->lock);
+ if (rdlock_dft)
+ rdlocks.insert(&ref->dirfragtreelock);
if (!mds->locker->acquire_locks(mdr, rdlocks, empty, empty))
return 0;
{
MClientRequest *req = mdr->client_request;
int client = req->get_client().num();
- CInode *diri = rdlock_path_pin_ref(mdr, false);
+ CInode *diri = rdlock_path_pin_ref(mdr, false, true); // rdlock dirfragtreelock!
if (!diri) return;
// it's a directory, right?
if (!dir) return;
// ok!
+ dout(10) << "handle_client_readdir on " << *dir << dendl;
assert(dir->is_auth());
// check perm
CDentry *prepare_null_dentry(MDRequest *mdr, CDir *dir, const string& dname, bool okexist=false);
CInode* prepare_new_inode(MDRequest *mdr, CDir *dir);
- CInode* rdlock_path_pin_ref(MDRequest *mdr, bool want_auth);
+ CInode* rdlock_path_pin_ref(MDRequest *mdr, bool want_auth, bool rdlock_dft=false);
CDentry* rdlock_path_xlock_dentry(MDRequest *mdr, bool okexist, bool mustexist);
CDir* try_open_auth_dirfrag(CInode *diri, frag_t fg, MDRequest *mdr);