break;
case MSG_COMMAND_REPLY:
if (m->get_source().type() == CEPH_ENTITY_TYPE_MDS) {
- handle_command_reply(ref_cast<MCommandReply>(m));
- return Dispatcher::HANDLED();
+ if (handle_command_reply(ref_cast<MCommandReply>(m))) {
+ return Dispatcher::HANDLED();
+ } else {
+ return Dispatcher::UNHANDLED();
+ }
} else {
return Dispatcher::UNHANDLED();
}
return 0;
}
-void Client::handle_command_reply(const MConstRef<MCommandReply>& m)
+bool Client::handle_command_reply(const MConstRef<MCommandReply>& m)
{
ceph_tid_t const tid = m->get_tid();
std::scoped_lock cmd_lock(command_lock);
if (!command_table.exists(tid)) {
ldout(cct, 1) << __func__ << ": unknown tid " << tid << ", dropping" << dendl;
- return;
+ return false;
}
auto &op = command_table.get_command(tid);
}
command_table.erase(tid);
+ return true;
}
// -------------------
void set_cap_epoch_barrier(epoch_t e);
- void handle_command_reply(const MConstRef<MCommandReply>& m);
+ bool handle_command_reply(const MConstRef<MCommandReply>& m);
int fetch_fsmap(bool user);
int resolve_mds(
const std::string &mds_spec,