| 3193 | |
| 3194 | |
| 3195 | Dispatcher::dispatch_result_t Client::ms_dispatch2(const MessageRef &m) |
| 3196 | { |
| 3197 | RWRef_t iref_reader(initialize_state, CLIENT_INITIALIZED); |
| 3198 | if (!iref_reader.is_state_satisfied()) { |
| 3199 | ldout(cct, 10) << "inactive, discarding " << *m << dendl; |
| 3200 | return Dispatcher::UNHANDLED(); |
| 3201 | } |
| 3202 | |
| 3203 | switch (m->get_type()) { |
| 3204 | // mounting and mds sessions |
| 3205 | case CEPH_MSG_MDS_MAP: |
| 3206 | handle_mds_map(ref_cast<MMDSMap>(m)); |
| 3207 | return Dispatcher::ACKNOWLEDGED(); |
| 3208 | case CEPH_MSG_FS_MAP: |
| 3209 | handle_fs_map(ref_cast<MFSMap>(m)); |
| 3210 | return Dispatcher::ACKNOWLEDGED(); |
| 3211 | case CEPH_MSG_FS_MAP_USER: |
| 3212 | handle_fs_map_user(ref_cast<MFSMapUser>(m)); |
| 3213 | return Dispatcher::ACKNOWLEDGED(); |
| 3214 | case CEPH_MSG_OSD_MAP: |
| 3215 | handle_osd_map(ref_cast<MOSDMap>(m)); |
| 3216 | return Dispatcher::ACKNOWLEDGED(); |
| 3217 | |
| 3218 | case CEPH_MSG_CLIENT_SESSION: |
| 3219 | handle_client_session(ref_cast<MClientSession>(m)); |
| 3220 | break; |
| 3221 | |
| 3222 | // requests |
| 3223 | case CEPH_MSG_CLIENT_REQUEST_FORWARD: |
| 3224 | handle_client_request_forward(ref_cast<MClientRequestForward>(m)); |
| 3225 | break; |
| 3226 | case CEPH_MSG_CLIENT_REPLY: |
| 3227 | handle_client_reply(ref_cast<MClientReply>(m)); |
| 3228 | break; |
| 3229 | |
| 3230 | // reclaim reply |
| 3231 | case CEPH_MSG_CLIENT_RECLAIM_REPLY: |
| 3232 | handle_client_reclaim_reply(ref_cast<MClientReclaimReply>(m)); |
| 3233 | break; |
| 3234 | |
| 3235 | case CEPH_MSG_CLIENT_SNAP: |
| 3236 | handle_snap(ref_cast<MClientSnap>(m)); |
| 3237 | break; |
| 3238 | case CEPH_MSG_CLIENT_CAPS: |
| 3239 | handle_caps(ref_cast<MClientCaps>(m)); |
| 3240 | break; |
| 3241 | case CEPH_MSG_CLIENT_LEASE: |
| 3242 | handle_lease(ref_cast<MClientLease>(m)); |
| 3243 | break; |
| 3244 | case MSG_COMMAND_REPLY: |
| 3245 | if (m->get_source().type() == CEPH_ENTITY_TYPE_MDS) { |
| 3246 | if (handle_command_reply(ref_cast<MCommandReply>(m))) { |
| 3247 | return Dispatcher::HANDLED(); |
| 3248 | } else { |
| 3249 | return Dispatcher::UNHANDLED(); |
| 3250 | } |
| 3251 | } else { |
| 3252 | return Dispatcher::UNHANDLED(); |
nothing calls this directly
no test coverage detected