}
unsigned hash = atoi(req->get_filepath2()[0].c_str());
frag_t fg = diri->dirfragtree[hash];
- CDir *dir = diri->get_or_open_dirfrag(mdcache, fg);
+ CDir *dir = diri->get_dirfrag(fg);
+ if (!dir) {
+ if (!diri->is_auth()) {
+ if (diri->is_ambiguous_auth()) {
+ // wait
+ dout(7) << " waiting for single auth in " << *diri << dendl;
+ diri->add_waiter(CInode::WAIT_SINGLEAUTH, new C_MDS_RetryRequest(mdcache, mdr));
+ return;
+ }
+ mdcache->request_forward(mdr, diri->authority().first);
+ return;
+ }
+ dir = diri->get_or_open_dirfrag(mdcache, fg);
+ }
assert(dir);
if (!dir->is_auth()) {
if (dir->is_ambiguous_auth()) {