]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: alllow handle_client_readdir() fetching freezing dir.
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 30 Nov 2012 00:53:33 +0000 (08:53 +0800)
committerSage Weil <sage@inktank.com>
Mon, 24 Dec 2012 04:01:11 +0000 (20:01 -0800)
At that point, the request already auth pins and locks some objects.
So CDir::fetch() should ignore the can_auth_pin check and continue
to fetch freezing dir.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/Server.cc

index 64e99a1e5a460ee802fefdbb401da56f1f76582c..6d1acc4020df49f161480be7172608e21160ae09 100644 (file)
@@ -2742,9 +2742,14 @@ void Server::handle_client_readdir(MDRequest *mdr)
   assert(dir->is_auth());
 
   if (!dir->is_complete()) {
+    if (dir->is_frozen()) {
+      dout(7) << "dir is frozen " << *dir << dendl;
+      dir->add_waiter(CDir::WAIT_UNFREEZE, new C_MDS_RetryRequest(mdcache, mdr));
+      return;
+    }
     // fetch
     dout(10) << " incomplete dir contents for readdir on " << *dir << ", fetching" << dendl;
-    dir->fetch(new C_MDS_RetryRequest(mdcache, mdr));
+    dir->fetch(new C_MDS_RetryRequest(mdcache, mdr), true);
     return;
   }