From 658d9917eb6cfb5cd87ff8b261c8fc4076a2b53d Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 16 Mar 2015 00:18:30 +0000 Subject: [PATCH] mds: emit DAMAGED on MDSTable load error Signed-off-by: John Spray --- src/mds/MDSTable.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mds/MDSTable.cc b/src/mds/MDSTable.cc index a1712dcd9edfa..5471ab53fc41e 100644 --- a/src/mds/MDSTable.cc +++ b/src/mds/MDSTable.cc @@ -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; -- 2.39.5