osd/PG: remove unused op_must_wait_for_map

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-02-27 20:14:57 -06:00
parent 9cde71f243
commit 0a8c3e409b
2 changed files with 0 additions and 112 deletions

View File

@ -5609,116 +5609,6 @@ bool PG::can_discard_request(OpRequestRef& op)
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;

View File

@ -2381,8 +2381,6 @@ public:
template<typename T, int MSGTYPE>
bool can_discard_replica_op(OpRequestRef& op);
static bool op_must_wait_for_map(epoch_t cur_epoch, OpRequestRef& op);
bool old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch);
bool old_peering_evt(CephPeeringEvtRef evt) {
return old_peering_msg(evt->get_epoch_sent(), evt->get_epoch_requested());