return true;
}
-bool PG::op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op)
-{
- switch (op->get_req()->get_type()) {
- case CEPH_MSG_OSD_OP:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDOp*>(op->get_req())->get_map_epoch());
-
- case CEPH_MSG_OSD_BACKOFF:
- return false; // we don't care about maps
-
- case MSG_OSD_SUBOP:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDSubOp*>(op->get_req())->map_epoch);
-
- case MSG_OSD_REPOP:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDRepOp*>(op->get_req())->map_epoch);
-
- case MSG_OSD_SUBOPREPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDSubOpReply*>(op->get_req())->map_epoch);
-
- case MSG_OSD_REPOPREPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDRepOpReply*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_SCAN:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGScan*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_BACKFILL:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGBackfill*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_BACKFILL_REMOVE:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGBackfillRemove*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_PUSH:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGPush*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_PULL:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGPull*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_PUSH_REPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGPushReply*>(op->get_req())->map_epoch);
-
- case MSG_OSD_EC_WRITE:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDECSubOpWrite*>(op->get_req())->map_epoch);
-
- case MSG_OSD_EC_WRITE_REPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDECSubOpWriteReply*>(op->get_req())->map_epoch);
-
- case MSG_OSD_EC_READ:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDECSubOpRead*>(op->get_req())->map_epoch);
-
- case MSG_OSD_EC_READ_REPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDECSubOpReadReply*>(op->get_req())->map_epoch);
-
- case MSG_OSD_REP_SCRUB:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDRepScrub*>(op->get_req())->map_epoch);
-
- case MSG_OSD_SCRUB_RESERVE:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDScrubReserve*>(op->get_req())->map_epoch);
-
- case MSG_OSD_REP_SCRUBMAP:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDRepScrubMap*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_UPDATE_LOG_MISSING:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGUpdateLogMissing*>(op->get_req())->map_epoch);
-
- case MSG_OSD_PG_UPDATE_LOG_MISSING_REPLY:
- return !have_same_or_newer_map(
- cur_epoch,
- static_cast<const MOSDPGUpdateLogMissingReply*>(op->get_req())->map_epoch);
- }
- ceph_abort();
- return false;
-}
-
void PG::take_waiters()
{
dout(10) << "take_waiters" << dendl;