summaryrefslogtreecommitdiff
path: root/src/mds
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2012-02-18 21:43:18 -0800
committerSage Weil <sage.weil@dreamhost.com>2012-02-18 22:12:26 -0800
commit10016923c9b782adfb15efa4e9cf27a80aa758dd (patch)
tree031732ce4fcb0ace8df08c7664af2d663658b2f4 /src/mds
parent1f240ca4ff32cf908c4325e3b6e6f71873f3680b (diff)
downloadceph-10016923c9b782adfb15efa4e9cf27a80aa758dd.tar.gz
mds: ignore all msgr callbacks on shutdown, not just dispatch
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/mds')
-rw-r--r--src/mds/MDS.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc
index d575e031ad9..2f1dd447d55 100644
--- a/src/mds/MDS.cc
+++ b/src/mds/MDS.cc
@@ -1589,8 +1589,15 @@ void MDS::respawn()
bool MDS::ms_dispatch(Message *m)
{
+ bool ret;
mds_lock.Lock();
- bool ret = _dispatch(m);
+ if (state == CEPH_MDS_STATE_DNE) {
+ dout(10) << " stopping, discarding " << *m << dendl;
+ m->put();
+ ret = true;
+ } else {
+ ret = _dispatch(m);
+ }
mds_lock.Unlock();
return ret;
}
@@ -1771,12 +1778,6 @@ bool MDS::is_stale_message(Message *m)
* it has not put the message. */
bool MDS::_dispatch(Message *m)
{
- if (state == CEPH_MDS_STATE_DNE) {
- dout(0) << " stopping, discarding " << *m << dendl;
- m->put();
- return true;
- }
-
if (is_stale_message(m)) {
m->put();
return true;
@@ -1959,6 +1960,8 @@ void MDS::ms_handle_connect(Connection *con)
{
Mutex::Locker l(mds_lock);
dout(0) << "ms_handle_connect on " << con->get_peer_addr() << dendl;
+ if (state == CEPH_MDS_STATE_DNE)
+ return;
objecter->ms_handle_connect(con);
}
@@ -1966,6 +1969,9 @@ bool MDS::ms_handle_reset(Connection *con)
{
Mutex::Locker l(mds_lock);
dout(0) << "ms_handle_reset on " << con->get_peer_addr() << dendl;
+ if (state == CEPH_MDS_STATE_DNE)
+ return false;
+
if (con->get_peer_type() == CEPH_ENTITY_TYPE_OSD) {
objecter->ms_handle_reset(con);
} else if (con->get_peer_type() == CEPH_ENTITY_TYPE_CLIENT) {
@@ -1988,6 +1994,8 @@ void MDS::ms_handle_remote_reset(Connection *con)
{
Mutex::Locker l(mds_lock);
dout(0) << "ms_handle_remote_reset on " << con->get_peer_addr() << dendl;
+ if (state == CEPH_MDS_STATE_DNE)
+ return;
objecter->ms_handle_remote_reset(con);
}
@@ -1996,6 +2004,8 @@ bool MDS::ms_verify_authorizer(Connection *con, int peer_type,
bool& is_valid)
{
Mutex::Locker l(mds_lock);
+ if (state == CEPH_MDS_STATE_DNE)
+ return false;
AuthAuthorizeHandler *authorize_handler =
authorize_handler_registry->get_handler(protocol);