From 1434e5c8c7d4c2347cffed83050870a24e0e047d Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 27 Aug 2014 22:32:12 +0100 Subject: [PATCH] mds: restart on -EBLACKLISTED Previously these cases would (hopefully) hit an assert(r==0) in the various completion contexts, and the MDS would "crash" from the user's point of view. With the introduction of MDSIOContext, we have a single place to filter all RADOS op responses, which also has a handle to the global MDS instance. Check result values for -EBLACKLISTED and call MDS::respawn() in response. Signed-off-by: John Spray --- src/mds/MDSContext.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index 4894aec092d01..47143f260d166 100644 --- a/src/mds/MDSContext.cc +++ b/src/mds/MDSContext.cc @@ -42,7 +42,12 @@ void MDSIOContextBase::complete(int r) { dout(10) << "MDSIOContextBase::complete: " << typeid(*this).name() << dendl; assert(mds != NULL); Mutex::Locker l(mds->mds_lock); - MDSContext::complete(r); + if (r == -EBLACKLISTED) { + derr << "MDSIOContextBase: blacklisted! Restarting..." << dendl; + mds->respawn(); + } else { + MDSContext::complete(r); + } } MDS *MDSIOContext::get_mds() { -- 2.39.5