]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: emit DAMAGED on MDSTable load error
authorJohn Spray <john.spray@redhat.com>
Mon, 16 Mar 2015 00:18:30 +0000 (00:18 +0000)
committerJohn Spray <john.spray@redhat.com>
Mon, 23 Mar 2015 10:55:08 +0000 (10:55 +0000)
Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSTable.cc

index a1712dcd9edfa030721d1687658b30474c3ef7c3..5471ab53fc41ea6b3f090e80d38f1a64760145ef 100644 (file)
@@ -22,6 +22,7 @@
 #include "include/types.h"
 
 #include "common/config.h"
+#include "common/errno.h"
 #include "common/Finisher.h"
 
 #include "include/assert.h"
@@ -158,12 +159,15 @@ void MDSTable::load_2(int r, bufferlist& bl, Context *onfinish)
   assert(is_opening());
   state = STATE_ACTIVE;
   if (r == -EBLACKLISTED) {
-    mds->suicide();
+    mds->respawn();
     return;
   }
   if (r < 0) {
     derr << "load_2 could not read table: " << r << dendl;
-    assert(r >= 0);
+    mds->clog->error() << "error reading table object '" << get_object_name()
+                       << "' " << r << " (" << cpp_strerror(r) << ")";
+    mds->damaged();
+    assert(r >= 0);  // Should be unreachable because damaged() calls respawn()
   }
 
   dout(10) << "load_2 got " << bl.length() << " bytes" << dendl;