]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: ignore reqrdlock if frozen
authorSage Weil <sage@newdream.net>
Mon, 23 Aug 2010 18:38:43 +0000 (11:38 -0700)
committerSage Weil <sage@newdream.net>
Mon, 23 Aug 2010 18:38:43 +0000 (11:38 -0700)
src/mds/Locker.cc

index dd2fe0f1f1d8dd1a9d8bcb83eb36d3aad689eda0..3cb02000142ec81a6c4ef88eb048706e6f46460d 100644 (file)
@@ -2643,16 +2643,18 @@ void Locker::handle_lock(MLock *m)
 
 void Locker::handle_reqrdlock(SimpleLock *lock)
 {
-  if (lock->get_parent()->is_auth() &&
+  MDSCacheObject *parent = lock->get_parent();
+  if (parent->is_auth() &&
       lock->is_stable() &&
-      lock->get_state() != LOCK_SYNC) {
+      lock->get_state() != LOCK_SYNC &&
+      !parent->is_frozen()) {
     dout(7) << "handle_reqrdlock got rdlock request on " << *lock
-           << " on " << *lock->get_parent() << dendl;
-    assert(lock->get_parent()->is_auth()); // replica auth pinned if they're doing this!
+           << " on " << *parent << dendl;
+    assert(parent->is_auth()); // replica auth pinned if they're doing this!
     simple_sync(lock);
   } else {
     dout(7) << "handle_reqrdlock ignoring rdlock request on " << *lock
-           << " on " << *lock->get_parent() << dendl;
+           << " on " << *parent << dendl;
     // replica will retry.
   }
 }