return true;
}
-bool OSD::require_osd_peer(Message *m)
+bool OSD::require_osd_peer(const Message *m)
{
if (!m->get_connection()->peer_is_osd()) {
dout(0) << "require_osd_peer received from non-osd "
return true;
}
-bool OSD::require_self_aliveness(Message *m, epoch_t epoch)
+bool OSD::require_self_aliveness(const Message *m, epoch_t epoch)
{
epoch_t up_epoch = service.get_up_epoch();
if (epoch < up_epoch) {
return true;
}
-bool OSD::require_same_peer_instance(Message *m, OSDMapRef& map,
+bool OSD::require_same_peer_instance(const Message *m, OSDMapRef& map,
bool is_fast_dispatch)
{
int from = m->get_source().num();
}
}
-bool OSD::op_is_discardable(MOSDOp *op)
+bool OSD::op_is_discardable(const MOSDOp *op)
{
// drop client request if they are not connected and can't get the
// reply anyway.
OSDMapRef map);
bool require_mon_peer(const Message *m);
- bool require_osd_peer(Message *m);
+ bool require_osd_peer(const Message *m);
/***
* Verifies that we were alive in the given epoch, and that
* still are.
*/
- bool require_self_aliveness(Message *m, epoch_t alive_since);
+ bool require_self_aliveness(const Message *m, epoch_t alive_since);
/**
* Verifies that the OSD who sent the given op has the same
* address as in the given map.
* @pre op was sent by an OSD using the cluster messenger
*/
- bool require_same_peer_instance(Message *m, OSDMapRef& map,
+ bool require_same_peer_instance(const Message *m, OSDMapRef& map,
bool is_fast_dispatch);
bool require_same_or_newer_map(OpRequestRef& op, epoch_t e,
void handle_signal(int signum);
/// check if we can throw out op from a disconnected client
- static bool op_is_discardable(MOSDOp *m);
+ static bool op_is_discardable(const MOSDOp *m);
public:
OSDService service;