From: John Spray Date: Wed, 27 Aug 2014 21:32:12 +0000 (+0100) Subject: mds: restart on -EBLACKLISTED X-Git-Tag: v0.86~175^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1434e5c8c7d4c2347cffed83050870a24e0e047d;p=ceph.git 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 --- diff --git a/src/mds/MDSContext.cc b/src/mds/MDSContext.cc index 4894aec092d..47143f260d1 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() {