| 1031 | } |
| 1032 | |
| 1033 | bool MDSRankDispatcher::ms_dispatch(const cref_t<Message> &m) |
| 1034 | { |
| 1035 | if (m->get_source().is_mds()) { |
| 1036 | const Message *msg = m.get(); |
| 1037 | const MMDSOp *op = dynamic_cast<const MMDSOp*>(msg); |
| 1038 | if (!op) |
| 1039 | dout(0) << typeid(*msg).name() << " is not an MMDSOp type" << dendl; |
| 1040 | ceph_assert(op); |
| 1041 | } |
| 1042 | else if (m->get_source().is_client()) { |
| 1043 | Session *session = static_cast<Session*>(m->get_connection()->get_priv().get()); |
| 1044 | if (session) |
| 1045 | session->last_seen = Session::clock::now(); |
| 1046 | } |
| 1047 | |
| 1048 | inc_dispatch_depth(); |
| 1049 | bool ret = _dispatch(m, true); |
| 1050 | dec_dispatch_depth(); |
| 1051 | return ret; |
| 1052 | } |
| 1053 | |
| 1054 | bool MDSRank::_dispatch(const cref_t<Message> &m, bool new_msg) |
| 1055 | { |
no test coverage detected