]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: drop MDSIOContext on mds->stopping
authorJohn Spray <john.spray@redhat.com>
Thu, 18 Jun 2015 10:08:05 +0000 (11:08 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 25 Jun 2015 15:19:24 +0000 (16:19 +0100)
`stopping` is true once the MDS has entered suicide().  During
this phase, any MDSIOContexts that are called (e.g. from objecter,
journaler) become no-ops.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSContext.cc

index 9a9a6f15ba14343a8fc297375e53540b36c16341..59854ff2869bf37536b1faee4e50ecdcf86e743c 100644 (file)
@@ -52,6 +52,12 @@ void MDSIOContextBase::complete(int r) {
   dout(10) << "MDSIOContextBase::complete: " << typeid(*this).name() << dendl;
   assert(mds != NULL);
   Mutex::Locker l(mds->mds_lock);
+  if (mds->stopping) {
+    dout(4) << "MDSIOContextBase::complete: dropping for stopping "
+            << typeid(*this).name() << dendl;
+    return;
+  }
+
   if (r == -EBLACKLISTED) {
     derr << "MDSIOContextBase: blacklisted!  Restarting..." << dendl;
     mds->respawn();