]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: wait for mydir replicas to go away in stopping 3753/head
authorJohn Spray <john.spray@redhat.com>
Mon, 16 Feb 2015 17:06:45 +0000 (17:06 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 17 Feb 2015 14:26:07 +0000 (14:26 +0000)
Previously, while we were waiting for locks related
to mydir to be acknowledged by other ranks, we could
advance to the point of capping the log.  When the
locks were acked, we would try to write to the log
and assert out.  Avoid this by waiting for mydir
to not be replicated before capping the log.

Fixes: #10743
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDCache.cc

index f62afae4e4ab0e326ba93fec4a92201362230776..f1607465c212edd0b304bfdb545f70432314de93 100644 (file)
@@ -7191,6 +7191,14 @@ bool MDCache::shutdown_pass()
   }
   assert(subtrees.empty());
 
+  // Still replicas of mydir?
+  if (mydir->inode->is_replicated()) {
+    // We do this because otherwise acks to locks could come in after
+    // we cap the log.
+    dout(7) << "waiting for mydir replicas to release: " << *mydir << dendl;
+    return false;
+  }
+
   // (only do this once!)
   if (!mds->mdlog->is_capped()) {
     dout(7) << "capping the log" << dendl;