#include "messages/MMonGetOSDMap.h"
#include "messages/MOSDPGNotify.h"
#include "messages/MOSDPGNotify2.h"
-#include "messages/MOSDPGQuery.h"
#include "messages/MOSDPGQuery2.h"
#include "messages/MOSDPGLog.h"
#include "messages/MOSDPGRemove.h"
-#include "messages/MOSDPGInfo.h"
#include "messages/MOSDPGInfo2.h"
#include "messages/MOSDPGCreate.h"
#include "messages/MOSDPGCreate2.h"
case MSG_OSD_SCRUB2:
handle_fast_scrub(static_cast<MOSDScrub2*>(m));
return;
-
case MSG_OSD_PG_CREATE2:
return handle_fast_pg_create(static_cast<MOSDPGCreate2*>(m));
- case MSG_OSD_PG_QUERY:
- return handle_fast_pg_query(static_cast<MOSDPGQuery*>(m));
case MSG_OSD_PG_NOTIFY:
return handle_fast_pg_notify(static_cast<MOSDPGNotify*>(m));
- case MSG_OSD_PG_INFO:
- return handle_fast_pg_info(static_cast<MOSDPGInfo*>(m));
case MSG_OSD_PG_REMOVE:
return handle_fast_pg_remove(static_cast<MOSDPGRemove*>(m));
-
// these are single-pg messages that handle themselves
case MSG_OSD_PG_LOG:
case MSG_OSD_PG_TRIM:
m->put();
}
-void OSD::handle_fast_pg_query(MOSDPGQuery *m)
-{
- dout(7) << __func__ << " " << *m << " from " << m->get_source() << dendl;
- if (!require_osd_peer(m)) {
- m->put();
- return;
- }
- int from = m->get_source().num();
- for (auto& p : m->pg_list) {
- enqueue_peering_evt(
- p.first,
- PGPeeringEventRef(
- std::make_shared<PGPeeringEvent>(
- p.second.epoch_sent, p.second.epoch_sent,
- MQuery(
- p.first,
- pg_shard_t(from, p.second.from),
- p.second,
- p.second.epoch_sent),
- false))
- );
- }
- m->put();
-}
-
void OSD::handle_fast_pg_notify(MOSDPGNotify* m)
{
dout(7) << __func__ << " " << *m << " from " << m->get_source() << dendl;
m->put();
}
-void OSD::handle_fast_pg_info(MOSDPGInfo* m)
-{
- dout(7) << __func__ << " " << *m << " from " << m->get_source() << dendl;
- if (!require_osd_peer(m)) {
- m->put();
- return;
- }
- int from = m->get_source().num();
- for (auto& p : m->pg_list) {
- enqueue_peering_evt(
- spg_t(p.info.pgid.pgid, p.to),
- PGPeeringEventRef(
- std::make_shared<PGPeeringEvent>(
- p.epoch_sent, p.query_epoch,
- MInfoRec(
- pg_shard_t(from, p.from),
- p.info,
- p.epoch_sent)))
- );
- }
- m->put();
-}
-
void OSD::handle_fast_pg_remove(MOSDPGRemove *m)
{
dout(7) << __func__ << " " << *m << " from " << m->get_source() << dendl;
class LogChannel;
class MOSDPGCreate2;
-class MOSDPGQuery;
class MOSDPGNotify;
-class MOSDPGInfo;
class MOSDPGRemove;
class MOSDForceRecovery;
class MMonGetPurgedSnapsReply;
bool is_fast_dispatch);
void handle_fast_pg_create(MOSDPGCreate2 *m);
- void handle_fast_pg_query(MOSDPGQuery *m);
void handle_pg_query_nopg(const MQuery& q);
void handle_fast_pg_notify(MOSDPGNotify *m);
void handle_pg_notify_nopg(const MNotifyRec& q);
- void handle_fast_pg_info(MOSDPGInfo *m);
void handle_fast_pg_remove(MOSDPGRemove *m);
public: