]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: process caps if freezing and unstable lock
authorSage Weil <sage@newdream.net>
Fri, 19 Dec 2008 23:46:06 +0000 (15:46 -0800)
committerSage Weil <sage@newdream.net>
Tue, 23 Dec 2008 19:45:22 +0000 (11:45 -0800)
The caps message may be a revocation ack that is needed to complete
the freeze.  In general, though, we back off even if freezing,
since we want to avoid starving the freeze as much as possible.

src/mds/Locker.cc

index a264afa2723b10d5929158667a0dc3f9810de353..4c6567f8beda85ca617b55a9b6b3b2553583fbce 100644 (file)
@@ -1019,7 +1019,8 @@ void Locker::handle_client_caps(MClientCaps *m)
   assert(cap);
 
   // freezing|frozen?
-  if (in->is_freezing() || in->is_frozen()) {
+  if ((in->is_freezing() && in->filelock.is_stable()) ||  // continue if freezing and lock is unstable
+      in->is_frozen()) {
     dout(7) << "handle_client_caps freezing|frozen on " << *in << dendl;
     in->add_waiter(CInode::WAIT_UNFREEZE, new C_MDS_RetryMessage(mds, m));
     return;