]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix dir fetch on lookup_hash fix
authorSage Weil <sage.weil@dreamhost.com>
Fri, 1 Apr 2011 18:09:58 +0000 (11:09 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 1 Apr 2011 18:24:14 +0000 (11:24 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mds/Server.cc

index f91cbfe94a0ccc0bb881b9e7b79ee55a1b6c1602..9d042324de450ab364826ede2b5696119297286f 100644 (file)
@@ -2095,8 +2095,10 @@ void Server::handle_client_lookup_hash(MDRequest *mdr)
       reply_request(mdr, -ESTALE);
       return;
     }
+    dout(10) << " have diri " << *diri << dendl;
     unsigned hash = atoi(req->get_filepath2()[0].c_str());
     frag_t fg = diri->dirfragtree[hash];
+    dout(10) << " fg is " << fg << dendl;
     CDir *dir = diri->get_dirfrag(fg);
     if (!dir) {
       if (!diri->is_auth()) {
@@ -2112,6 +2114,7 @@ void Server::handle_client_lookup_hash(MDRequest *mdr)
       dir = diri->get_or_open_dirfrag(mdcache, fg);
     }
     assert(dir);
+    dout(10) << " have dir " << *dir << dendl;
     if (!dir->is_auth()) {
       if (dir->is_ambiguous_auth()) {
        // wait
@@ -2123,7 +2126,7 @@ void Server::handle_client_lookup_hash(MDRequest *mdr)
       return;
     }
     if (!dir->is_complete()) {
-      dir->fetch(0, new C_MDS_RetryRequest(mdcache, mdr));
+      dir->fetch(new C_MDS_RetryRequest(mdcache, mdr));
       return;
     }
     reply_request(mdr, -ESTALE);